Description: a Java program (with the necessary I/O exception handling code) which will sort the names into
two files based on their length. Names with 5 letters or less should be written to a file named
“small.txt”. Names with more than 5 letters should be written to a file named “big.txt”. Maintain the
relative order of the names as they appear in “names.txt”. Each name should be followed by a newline
character. Neither file should have any blank line. Given the above “names.txt” file, your program
should produce the following two files:
small.txt large.txt
To Search:
File list (Check if you may need any files):
names.txt
small.txt
big.txt
Lab8p.class
Lab8p.java