class Test {
public static void main(String[] args) {
private int x = 10;
public int y = 20;
protected int z = 30;
static int w = 40;
final int i = 50;
}
}
Run Code Online (Sandbox Code Playgroud)
该只适用修改是最后在这里; 对于其他修饰符,程序会给出编译器错误.这是为什么?请详细解释.