我收到錯誤「刪除無效修改」當我使用類動物園protected
關鍵字。錯誤使得當類保護
protected class Zoo {
int x=5;
String coolMethod() {
return "Wow baby";
}
static Test t=new Test();
}
public class Test {
public static void main(String args[]) {
Test zoo=new Test();
//System.out.println(zoo.coolMethod());
//System.out.println(x);
//t.useMyCoolMethod();
//Testing v=new Testing();
//System.out.println(v.getValue());
}
我該如何解決這個問題?