这是针对Java的入门课程,我们只是学习svn,什么不是。当我在eclipse上编写并执行程序时它运行正常,我想在将它提交给svn后仔细检查命令提示符,但它返回了以下错误。
javac -d bin/ src/a0/Cfiltering.java src/driver/CfilteringDriver.java
src/a0/Cfiltering.java:267: cannot find symbol
symbol : method compare(int,int)
location: class java.lang.Integer
return Integer.compare(ints[0] * 10 + ints[1],
^
src/a0/Cfiltering.java:333: cannot find symbol
symbol : method compare(int,int)
location: class java.lang.Integer
return Integer.compare(ints[0] * 10 + ints[1],
^
2 errors
我不知道为什么会这样,导致错误的原始代码在这里:
Collections.sort(resultList, new Comparator<int[]>() {
public int compare(int[] ints, int[] otherInts) {
return Integer.compare(ints[0] * 10 + ints[1],
otherInts[0] * 10 + otherInts[1]);
}
});
以下是我的导入:
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.ArrayList;
import java.util.List;
import java.lang.Integer;