分析错误日志:
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class tongji { @SuppressWarnings({ "unused" }) public static void main(String[] args) throws IOException { //error.log-2017-02-24 StringBuffer sb= new StringBuffer(""); FileReader reader = new FileReader("D:\\document\\error.log-2017-02-24"); BufferedReader br = new BufferedReader(reader); String str = null; while((str = br.readLine()) != null) { if(str.length()>80){ System.out.println(str); } } br.close(); reader.close(); } }