JAVA基础
清流鱼
这个作者很懒,什么都没留下…
展开
-
函数中try catch finally 的返回值
package com.ibm.etp; public class ReturnValue { public static void main(String[] args) { int temp = show(); System.out.println(temp); } private static int show() { int a=3;...2010-07-05 11:54:00 · 141 阅读 · 0 评论 -
换行(‘\n’)的另类写法System.getProperty("line.separator")
今天看到一行java的一行代码,String newLine = System.getProperty("line.separator");看过之后有点晕,到网上查过之后,才知道它与‘\n’有相同的功能,下面是测试代码: StringBuffer buf=new StringBuffer(); buf=buf.append("sun"); buf=buf.append(System....2010-07-05 16:12:51 · 558 阅读 · 0 评论