摘要:
直接上代码: 输出: 阅读全文
摘要:
今天测试代码时遇到 Error:(6, 55) java: non-static method sayGoodbye() cannot be referenced from a static context 的报错,代码如下: 原因: 不能直接调用类变量和类方法。 解决方法一: 将方法改成类方法,如 阅读全文
摘要:
区别 String s1="xxx" 与 String s2=new String("xxx") 的区别 equals() 和 == 的区别 单引号与双引号的区别 int a =(int)str.charAt(0)与int a = Integer.parseInt(str.charAt(0))区别 阅读全文