摘要:
加上单引号的:‘0’代表一个字符;s.charAt(i)方法:返回指定索引位置的字符;s.charAt(i)-'0':两个字符相减实际上是ASCII码对应的数相减;s.charAt(i)-'0'==digit:也就是s.charAt(i)-'0'的结果对应的ASCII码值(整数)与 digit(整数 阅读全文
posted @ 2025-01-02 18:13
Grit_Doyle
阅读(34)
评论(0)
推荐(0)
摘要:
抽象类不能实例化对象,所以抽象类必须被继承一个类只能继承一个抽象类,而一个类却可以实现多个接口静态方法只要定义了类,不必建立类的实例就可使用。静态方法只能调用静态变量。通过对象来使用,也可以通过类来使用 在构造方法中尽量避免调用任何方法,尽可能简单地使对象进入就绪状态,能够安全调用的是final的方 阅读全文
posted @ 2025-01-02 18:12
Grit_Doyle
阅读(12)
评论(0)
推荐(0)
摘要:
1)接口不能有构造方法,抽象类可以有。 2)接口不能有方法体,抽象类可以有。 3)接口不能有静态方法,抽象类可以有。 4)在接口中凡是变量必须是public static final,而在抽象类中没有要求。 阅读全文
posted @ 2025-01-02 18:11
Grit_Doyle
阅读(11)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2025-01-02 18:11
Grit_Doyle
阅读(6)
评论(0)
推荐(0)
摘要:
[public] [abstact|final] class className [extends superclassName] [implements InterfaceNameList]{ //类声明 [public | protected | private] [static] [final 阅读全文
posted @ 2025-01-02 18:11
Grit_Doyle
阅读(12)
评论(0)
推荐(0)
摘要:
//接口声明[public] interface interfaceName [extends listOfSuperInterface]{ …… } //接口的方法定义returnType methodName ( [paramlist] ); //接口的完整示例interface Collect 阅读全文
posted @ 2025-01-02 18:10
Grit_Doyle
阅读(30)
评论(0)
推荐(0)
摘要:
快速复制上一行 :Ctrl+Alt+向下箭头替换单词:Ctrl+F 阅读全文
posted @ 2025-01-02 18:09
Grit_Doyle
阅读(13)
评论(0)
推荐(0)
摘要:
1.Windows->Preferences2.左侧选择Java–>Code Style–> Code Temp3.右侧的上方框里,在 Code 下选择相关方法,选择后点击右侧 Edit… 阅读全文
posted @ 2025-01-02 18:09
Grit_Doyle
阅读(30)
评论(0)
推荐(0)
摘要:
单个文件使用:Ctrl+f整个项目使用:先选中要修改的东西,然后在菜单栏中search→text→project,然后在search的console中,单击项目,右键选中replace all,填入替换的内容 阅读全文
posted @ 2025-01-02 18:08
Grit_Doyle
阅读(170)
评论(0)
推荐(0)
摘要:
Window->Preferences->General->Editors->Text Editors->Annotations->Occurrences 阅读全文
posted @ 2025-01-02 18:08
Grit_Doyle
阅读(32)
评论(0)
推荐(0)

浙公网安备 33010602011771号