Hello all in java land. I need some help figuring out how to read and display a txt file, the amount of words, the amount of lines and amount of char not including white spaces. I can open the file and display it but i dont have much else. heres what i got thus far...
Code:package hw3;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class Hw3 {
public static void main(String[] args)throws Exception {
try {
BufferedReader in = new BufferedReader( new FileReader("file"));
String line;
while ( ( line = in.readLine() ) != null ) {
System.out.println( line );
}
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}}

