-
-
Save tony1223/b02a3e300c2a94e445ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
StringBuffer result = new StringBuffer(); | |
while(str != null){ | |
result.append(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