【简答题】阅读程序写结果 class Test{ int a=1; void m1(){ System.out.println(a); } } class E1 extends Test{ int a=2,b=3,c; void m2(){ System.out.println(a); } } public class H{ public static void main(String[] s){ E1 e...
【简答题】阅读程序写结果 import java.io.*; public class Test{ public static void main(String args[]){ SubClass sb = new SubClass( ); System.out.println(sb.max( )); } } class SuperClass{ int a = ...
【简答题】阅读程序写结果 class Test{ public int x=2; Test(){ System.out.println("Test"); } } class Test1 extends Test{ public int x=3; Test1(){ System.out.println("Test1"); } } class H{ public static void main(String[...
【简答题】阅读程序写结果 class test { public static void main (String [] args ){ int x=9, y; if (x>=0) if (x>0) y=1; else y=0; else y=-1; System.out.println(y); } }
【简答题】阅读程序写结果 class Father { void sport() { System.out.print("打篮球!"); } } class Son extends Father { void sport() { System.out.print("踢足球!"); } } public class Test { public static void main(String[] args) {...
【简答题】阅读程序写结果 class A { double f(double x, double y) { return x * y; } } class B extends A { double f(double x, double y) { return x + y; } } public class Test { public static void main(String args[]) { ...