为什么下面的程序还会有 Syntax error on token ":", * expected
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Syntax error on token ":", * expected
public class TestAssert {
public void methodA(int i){
assert (i>=0 : methodB());
System.out.pritnln(i);
}
public int methodB(){
System.out.println("The value must not be negative");
return 3;
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
TestAssert test=new TestAssert();
test.methodA(-10);
}
}