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

题目详情

单选题 请说出A类中System.out.println的输出结果. class B { int x = 100,y = 200; public void setX(int x) { x = x; } public void setY(int y) { this.y = y; } public int getXYSum() { return x+y; } } public class A { public static void main(String args[]) { B b = new B(); b.setX(-100); b.setY(-200); System.out.println("sum="+b.getXYSum()); } }

A. sum=-100

B. sum=100

C. sum=200

D. sum=-300

基于框架的WEB开发技术课程封面

学科:基于框架的WEB开发技术

时间:2024-09-26 07:23:10

Copyright © 2022 津ICP备2021001502号