|
Reading FileInput data
Hi all, let's say we have a text file named "data1.txt" which contains 5 lines of random letters with no spaces.
I want to create a java program that reads the data in data1.txt and prints the length (number of letters on one line), the first 5 letters in data1.txt, and truncate those 5 letters to the first 3 letters and print those 3 letters on the output screen.
Basically, I just want a simple program that reads the data in a txt data file (with "File newone = new File("data1.txt");" ?) and manipulates what's read.
Thanks
Eric
|