标签:str except print private bsp main cat stat ack
private static final String FILENAME = "c:\\temp\\in.txt"; public static void main(String[] args) { BufferedReader br = null; FileReader fr = null; try { fr = new FileReader(FILENAME); br = new BufferedReader(fr); String sCurrentLine; // br = new BufferedReader(new FileReader(FILENAME)); while ((sCurrentLine = br.readLine()) != null) { System.out.println(sCurrentLine); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null) br.close(); if (fr != null) fr.close(); } catch (IOException ex) { ex.printStackTrace(); } } }
标签:str except print private bsp main cat stat ack
原文地址:http://www.cnblogs.com/kakaisgood/p/6661486.html