publicinterface Face{
intcounter = 40;
}
publicclass Test implements Face{
private static int counter;
public static void main(String[]args){
System.out.println(++counter);
}
}
javac Face.java
错误: 类Test是公共的, 应在名为 Test.java 的文件中声明
public static class Test implements Face {
^