Problem 2
What is a stream? What are the different types of Streams available in Java?
Problem 3
Compare and contrast Byte stream classes and Character Stream classes.
Problem 8
Write a program to read primitive data type from a file.
Problem 9
Write a program that will count the number of characters and words in a file.
Problem 10
Write a Java program to accept two parameters on the command line. If there are no command line arguments entered, the program should print the error message and exit. The program should check whether the first file exists and if it is an ordinary file. If it is so, then the content is copied to the second file.
Problem 11
Write a Java program to check whether the file is readable, writable and hidden.
Problem 12
Write a Java program to accept one parameter on the command line. If there are no command line arguments entered, the program should print the error message and exit. The program should check whether the input is a directory. And also display the names of files in the directory.
Problem 13
While reading a file, how do you check whether you have reached the end of the file?
Problem 15
Distinguish between: (a) FileInputstream and FileReader. (b) FileOutput Stream and FileWriter.