阅读下列代码public class Example {public static void main(String[] args) {int[] srcArray = { 11, 12, 13, 14 };int[] destArray = { 21, 22, 23, 24 };System.arraycopy(srcArray, 1, destArray, 2, 2);for (int i = 0; i < destArray.length; i++) {System.out.print(destArray[i] + " ");}}}下列选项中,程序的运行结果是?
答:21 22 12 13
继续答题:下一题


更多JAVA程序设计试题
- 1编译运行下面的程序,结果是什么?public class A {public static void main(String[] args) {B b = new B();b.test();}void test() {System.out.print("A");}}class B extends A {void test() {super.test();System.out.print("B"); }}
- 2设有定义 int i=123;long j=456; 下面赋值不正确的语句是
- 3下列程序中哪行代码是错误的?public class Exam{public static void main(String args[]) {int x = 8;byte b = 127;//【代码A】b = x;//【代码B】long y=x;//【代码C】float z=6.89F;//【代码D】}}
- 4下列哪个变量声明是错误的?
- 5关于接口的定义和实现,以下描述正确的是?
- 6类中的一个成员方法被下面哪个修饰符修饰,该方法只能在本类被访问?