【分录题】(4-2)写出下面程序运行结果。 public class Demo2 { public static void main(String[] args) { int [][] arr=new int[3][3]; int sum=0; for(int i=0;i<arr.length;i++) for(int j="0;j<arr[i].length;j++)" sum="sum+i+j;" system.out.println(sum); }>
第1题
第2题
【分录题】(7-12)请阅读程序,写出程序运行结果。 class A{ static String name="tom"; static int getX() { return 2; } int getY() { return 3; } } class B extends A{ static String name="Tuny"; static int getX() { return 4; } int getY() { return 5; } } class C extends A{ static String name="Tuny"; static int getX() { return 4; } int getY() { return 5; } } interface D{ int getY(); } class E implements D{ public int getY() { return 6; } } public class Demo{ public static void main(String[] args) { A a=new A(); A b=new B(); A c=new C(); D d=new E(); int sum=a.name.length()+b.getX()+c.getY()+d.getY(); System.out.println(sum); } }
第3题
第4题
第5题
第6题
第7题
第8题
第9题
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!