题海让大学四年没有难题
白天模式登陆

题目详情

单选题 下列【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】 } }

A. 【2】

B. 【4】

C. 【1】

D. 【3】

学科:默认课程

时间:2025-12-09 15:04:23

Copyright © 2022 津ICP备2021001502号