摘要: 下面是20个非常有用的Java程序片段,希望能对你有用。1. 字符串有整型的相互转换String a = String.valueOf(2); //integer to numeric string int i = Integer.parseInt(a); //numeric string to an int 2. 向文件末尾添加内容BufferedWriter out = null; try { out = new BufferedWriter(new FileWriter(”filename”, true)); out.write(”aString”)... 阅读全文
posted @ 2013-06-28 20:47 盗草人 阅读(202) 评论(0) 推荐(0) 编辑