题目详情
单选题 下列【1】、【2】、【3】、【4】注释标注的哪行代码有错误?( ) class Tom { private int x = 120; protected int y = 20; int z = 11; private void f() { x = 200; System.out.println(x); } void g() { x = 200; System.out.println(x); } } public class E { public static void main(String args[]) { Tom tom = new Tom(); tom.x = 22; //【1】 tom.y = 33; //【2】 tom.z = 55; //【3】 tom.g(); //【4】 } }

学科:默认课程
时间:2025-12-09 15:04:23
