【简答题】写出程序结果: class Fu { int num = 4; void show() { System.out.println("Fu show"); } } class Zi extends Fu { int num = 5; void show() { System.out.println("Zi show"); } } public class Demo { public static v...
【单选题】设有如下程序: #include class A { public: int i; display() { cout<<”class A\n”; } }; class B {public: int i; display() { cout<<”class B\n”; } }; class C: public: A,public B { int j; public: int i; s...
【简答题】请简述下列程序运行结果。 class A{ int y=6; class Inner{ static int y=3; void show(){ System.out.println(y); } } } class Demo{ public static void main(String [] args){ A.Inner inner=new A().new Inner(); inner.show...
【单选题】设有如下程序: #include class A { public: int i; display() { cout<}; class B { public: int i; display() { cout<}; class C: public: A, public B { int j; public: int i; show() {j=i*i; display();} }; v...
【单选题】设有如下程序: class { public: int i; display() { cout<<”class A\n”; } }; class B {public: int i; display() { cout<<”class B\n”; } }; class C: public: A,public B { int j; public: int i; show() {j=i*i; displa...
【简答题】代码如下,其运行结果是: ______________ ______________ 。 public class Demo{ int a=100 int b=50; public void avg(){ float c = (a+b) / 2; } public void show(){ System.out.println( “平均值为:”+ c ); } public stati...