下面这段代码编译和运行时会发生什么情况()。 abstract class MineBase { abstract void amethod(); static int i; } public class Mine extends MineBase { public static void main(String[] args) { int[ ] ar = new int[5]; for(int i=0; i < ar.length; i++) System.out.println(ar[i]); } }

A、将0到4打印出来 B、Error: ar is used before it is initialized C、Error: Mine is not abstract and does not override abstract method amethod () in MineBase D、Array IndexOutOfBoundes Error

时间:2023-09-23 03:13:53

相似题目