摘要:
下列这段代码已全部包含了我要写的String类中重要的字段: //StringMisc.java// This program demonstrates the length, charAt and getChars// methods of the String class.//// Note: 阅读全文
摘要:
程序源码: /邵文政 2015 10 17 记录创建对向的个数 public class Objictnumber { int number; public Objictnumber() { ++number; System.out.println("目前创建了"+number+"个对象"); } 阅读全文
摘要:
先解释一下装箱和拆箱: 装箱就是 自动将基本数据类型转换为包装器类型;拆箱就是 自动将包装器类型转换为基本数据类型。 下表是基本数据类型对应的包装器类型: 下面是代码: public class BoxAndUnbox { /** * @param args */ public static voi 阅读全文