【分录题】(10-1)请写出程序运行结果。 class Base{ private int x; public Base(int x) { this.x =
【分录题】(10-1)请写出程序运行结果。 class Base{ private int x; public Base(int x) { this.x = x; } public void setX(int x) { this.x = x; } public int getX() { return this.x; } public String toString() { return ""+this.x; } } public class Demo2 { public static void main(String[] args) { Base a=new Base(10); Base b=a; b.setX(20); System.out.println(a.getX()*b.getX()+""+a); } }