2013年6月27日

摘要: http://docs.oracle.com/javase/1.5.0/docs/api/TheProcessBuilder.start()andRuntime.execmethods createa native processand return an instance of a subclass ofProcessthat can be used to control the process and obtain information about it. The classProcessprovides methods for performing input from the pro 阅读全文
posted @ 2013-06-27 23:18 孟子hehe 阅读(228) 评论(0) 推荐(0) 编辑
 
摘要: 声明:转载请注明出处static{}(即static块),会在类被加载的时候执行且仅会被执行一次,一般用来初始化静态变量和调用静态方法,下面我们详细的讨论一下该语句块的特性及应用。一、在程序的一次执行过程中,static{}语句块中的内容只被执行一次,看下面的示例:示例一view plaincopy to clipboardprint?class Test{ public static int X=100; public final static int Y;=200 public Test(){ System.out.println("Test构造函数执行"); } st 阅读全文
posted @ 2013-06-27 23:07 孟子hehe 阅读(207) 评论(0) 推荐(0) 编辑