摘要: Integer类有两个看起来很类似的静态方法,一个是Integer.getInteger(String),另外一个是Integer.valueOf(String)。如果只看方法名称的话,很容易将这两个方法的功能区分开来,还是让我们来看看Java文档。 Integer.getInteger(String)的功能是根据指定的名称得到系统属性的整数值。第一个参数将被认为是系统属性的名称。系统属性可以通过 System.getProperty(java.lang.String)方法访问得到。属性值字符串将被解释成一个整数,并且以表示这个值的Integer对象形式返回。可能出现的数字格式的详细说明可以. 阅读全文
posted @ 2013-12-13 22:30 Jackvin 阅读(1817) 评论(0) 推荐(0) 编辑
摘要: 在上面的两个篇博客中,我们看到String和Integer不同的常量池的变现形式我们再看一个例子:public static void main(String[] args) {// TODO Auto-generated method stub String i1 = "hello"; String i2="world"; String i5=new String("helloworld"); System.out.println(i5==(i1+i2)); Integer m1=40 ; ... 阅读全文
posted @ 2013-12-13 21:13 Jackvin 阅读(626) 评论(0) 推荐(0) 编辑
摘要: 我们先看一个关于Integer的例子public static void main(String[] args) { // TeODO Auto-generated method stu Integer i1 = 40; Integer i2 = 40; Integer i3 = 0; Integer i4 = new Integer(40); Integer i5 = new Integer(40); Integer i6 = new Integer(0); System.o... 阅读全文
posted @ 2013-12-13 20:48 Jackvin 阅读(1648) 评论(0) 推荐(0) 编辑
摘要: 其他博友的不同理解方式: http://hi.baidu.com/boywell/item/d5ee5b0cc0af55c875cd3cfd我们先来看一个类public class javaPTest { /**常量池 * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String i1 = "hello"; String i2="world"; String i3="helloworld"; Str 阅读全文
posted @ 2013-12-13 17:46 Jackvin 阅读(750) 评论(0) 推荐(0) 编辑
摘要: JVM指令集(指令码、助记符、功能描述)指令码助记符功能描述0x00nop无操作0x01aconst_null指令格式: aconst_null功能描述: null进栈。指令执行前指令执行后栈底......null栈顶注意:JVM并没有为null指派一个具体的值。0x02iconst_m1int型常量值-1进栈0x03iconst_0int型常量值0进栈0x04iconst_1int型常量值1进栈0x05iconst_2int型常量值2进栈0x06iconst_3int型常量值3进栈0x07iconst_4int型常量值4进栈0x08iconst_5int型常量值5进栈0x09lconst_0 阅读全文
posted @ 2013-12-13 16:40 Jackvin 阅读(652) 评论(0) 推荐(0) 编辑
摘要: java中测试两个变量相等有两种方法:==和equals1.当使用==时,如果 两个变量是基本数据类型变量,且都是数值类型(不严格要求数据类型相同),则只需要两者的变量的值相等,就返回true如果 是两个引用类型的变量,他们必须只想指向一个对象时,==判断才会返回true(==不可用于比较类型上没有父子关系的两个变量)2.当使用equals时,equals是用来比较引用类型值相等的,对于8大基本数据类型,是有重写Objdect中的equals方法 在Object中equals方法和==一样Object中equals方法public boolean equals(Object obj) { re 阅读全文
posted @ 2013-12-13 10:41 Jackvin 阅读(278) 评论(0) 推荐(0) 编辑
摘要: A 窗口类快捷键 1. 【Ctrl+Alt+G】:在工作空间中查找文本 2. 【Ctrl+G】:工作空间中的声明 3. 【Ctrl+Shift+G】:工作空间中的引用 4. 【Ctrl+H】:打开【搜索】对话框 5. 【Ctrl+Shift+U】:显示【文件中的出现位置】快速菜单 6. 【Alt+Shift+N】:【新建】菜单 7. 【Ctrl+S】:保存 8. 【Ctrl+Shift+S】:全部保存 9. 【Ctrl+F4】或【Ctrl+W】:关闭 10. 【Ctrl+Shift+F4】或【Ctrl+Shift+W】:全部关闭 11. 【F5】 :刷新 12. 【Alt+Enter】:属性 阅读全文
posted @ 2013-12-13 09:14 Jackvin 阅读(318) 评论(0) 推荐(0) 编辑
摘要: In Eclipse, when you press Ctrl button and click on any Class names, the IDE will take you to the source file for that class. This is the normal behavior for the classes you have in your project.But, in case you want the same behavior for Java’s core classes too, you can have it by attaching the Jav 阅读全文
posted @ 2013-12-13 09:08 Jackvin 阅读(654) 评论(0) 推荐(0) 编辑