1.public class A {
2. public static void main(String[] args) {
3. certkiller("four");
4 certkiller("tee");
5 certkiller("to");
6 }
7
8 public static void certkiller(String str) {
9
10 int check = 4;
11 if (check.equal(str.length())) {
12 System.out.print(str.charAt(check -= 1) + " ");
13 } else {
14 System.out.print(str.charAt(0) + " ");
}
}
}
编译时10,11行显示无法取消引用int
这是什么意思???如果把equal方法换成==就成功了
谁帮我讲解一下。谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货