B.Sc. (H) Computer Science, Semester II Lab Exercises
BHCS03 – Programming in JAVA
Attempt the following questions as part of JAVA Lab class today:
1. Write a program that will count the number of characters, words and lines in a file. Words are separated by whitespace characters. The filename should be passed as a command-line.
(Use Exception handling)
2. Write a program that removes all the occurrences of a specified string from a text file. Your program should get arguments from the command line. (Use Exception handling)
PS: You may send the solutions and/or doubts to
[email protected]. The file that you send should be saved with your roll number-subject name-today’s date.