文件名称:lab8
介绍说明--下载内容均来自于网络,请自行研究使用
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
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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
names.txt
small.txt
big.txt
Lab8p.class
Lab8p.java