摘要:
java中测试两个变量相等有两种方法:==和equals1.当使用==时,如果 两个变量是基本数据类型变量,且都是数值类型(不严格要求数据类型相同),则只需要两者的变量的值相等,就返回true如果 是两个引用类型的变量,他们必须只想指向一个对象时,==判断才会返回true(==不可用于比较类型上没有父子关系的两个变量)2.当使用equals时,equals是用来比较引用类型值相等的,对于8大基本数据类型,是有重写Objdect中的equals方法 在Object中equals方法和==一样Object中equals方法public boolean equals(Object obj) { re 阅读全文
摘要:
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】:属性 阅读全文
摘要:
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 阅读全文