Skip to content

Instantly share code, notes, and snippets.

@tony1223
Created April 27, 2012 04:47
Show Gist options
  • Save tony1223/b424fa134cead3593ada to your computer and use it in GitHub Desktop.
Save tony1223/b424fa134cead3593ada to your computer and use it in GitHub Desktop.
public static void main(String[] args) throws Exception {
Date d= new Date();
BufferedReader inupt = new BufferedReader(new FileReader(new File("C:/Users/tony/Documents/test.txt")));
String str = inupt.readLine();
String result = "";
while(str != null){
result+=(str);
str = inupt.readLine();
}
inupt.close();
System.out.println(result.length());
System.out.println(new Date().getTime() - d.getTime());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment