随笔分类 -  java基础

摘要:package test;import javax.swing.JOptionPane;public class HanNuoTa { private static final String DISK_B = "diskB"; private static final String DISK_A = "diskA"; private static final String DISK_C = "diskC"; static String from = DISK_A; static String to = DISK_C; static S 阅读全文
posted @ 2013-06-21 20:42 ㊣执着㊣ 阅读(138) 评论(0) 推荐(0)
摘要://读文件public static String read(String fileName) throws IOException {StringBuffer buffer = new StringBuffer();BufferedReader in = new BufferedReader(new FileReader(fileName));String s;while( (s = in.readLine()) != null){buffer.append(s);buffer.append("\n");}in.close();return buffer.toString 阅读全文
posted @ 2013-06-20 23:03 ㊣执着㊣ 阅读(259) 评论(0) 推荐(0)