1.
Write a Java program that reads a file name from the user, and then
displays information about whether the file exists, whether the file is
readable, whether the file is writable, the type of file and the length of
the file in bytes.
2. Write a Java program that reads a file and displays the file on the
screen, with a line number before each line.
3. Write a Java program that displays the number of characters, lines and
words in a text file.
4. Write a Java program to illustrate collection classes like (i) Array List, (ii)
Iterator, (iii)Hash map.
5. Convert the content of a given file into the uppercase content of the
same file. (co3)
6. Write a program to delete all files with extension .txt from the U:\home
directory.
7. Write an application to search for a file in a directory tree (use recursive
function).
8. Write an application to append the contents of one file to another.
9. Write a program to accept n products and save the objects into a file.
Read the objects back and display.
10. Write a program to read and show the contents of three different
files as a sequence.
11. Modify the above program to work with three different byte arrays.
12. Modify program 3 using character oriented stream classes.
13. Use PrintStream to write line by line output to a file (Hint: use
println() method).
14. Write a program that creates a user interface to perform integer
divisions. The user enters two numbers in the textfields, Num1 and
Num2. The division of Num1 and Num2 is displayed in the Result field
when the Divide button is clicked. If Num1 or Num2 were not an integer,
the program would throw NumberFormatException. If Num2 were Zero,
the program would throw an ArithmeticException.Display theexception in
a message dialog box (co3)
15. Java programs to create an bank account with minimum balance,
deposit amount, withdraw amount and throws LessBalanceException,
create a LessBalanceException class which returns a statement says
withdraw amount is not valid, creates 2 accounts and try to withdraw
more money than account and see which type of exception occurs. (CO3)
16. Write a Java program to implement user defined exception
handling.
17. Write a Java program that reads a file name from the user, displays
information about whether the file exists, whether the file is readable, or
writable, the type of file and the length of the file in bytes.