How can i plot a histogram from the results of the following code.
Thanks in advance for your help
Serkan
import java.io.*;
public class LineLen {
public static void main(String args[]) throws Throwable {
//
// Open the file
final String filename = "LineLen22.java";
BufferedReader infile = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
// Read in a line
// While the line is not null
// Read it in
// Set the length to be 'len'
// increment the line number
// print line number, len
// read in the next line
String line = infile.readLine();
int linenum = 0;
while (line != null) {
int len = line.length();
linenum++;
System.out.println(linenum + "\t" + len);
line = infile.readLine();
}
}