int[]my_Array;my_Array=newint[5];for(intcount=0;count<=5;count++)System.out.println(my_Array[count]);以上Java代码运行的结果是()。A.将1,2,3,4,5输出到屏幕B.将0,1,2,3,4输出到屏幕C.将0,1,2,3,4,5输出到屏幕D.将出现运行时异常

题目
int[]my_Array;my_Array=newint[5];for(intcount=0;count<=5;count++)System.out.println(my_Array[count]);以上Java代码运行的结果是()。

A.将1,2,3,4,5输出到屏幕

B.将0,1,2,3,4输出到屏幕

C.将0,1,2,3,4,5输出到屏幕

D.将出现运行时异常


相似考题
更多“int[]my_Array;my_Array=newint[5];for(intcount=0;count&lt;=5;count++)System.out.println(my_Array[count]);以上Java代码运行的结果是()。 ”相关问题
  • 第1题:

    读以下程序得到运行结果是______ #include<stdio.h> int main() { int k[30]={12,324,45,6}; int count=0,i=0; while(k[i]) { if(k[i]%2==0 || k[i]%5==0) count++; i++; } printf("%d,%dn",count,i); }


    emoclew emoclew

  • 第2题:

    给定如下Java代码片段,编译运行时,结果是() int [ ] a = {1,2,3,4,5}; for (int count = 0 ; count<5; count++) System.out.print(a[count++]) ;

    A.运行时出现异常

    B.输出:12345

    C.输出:135

    D.输出:24


    输出:135

  • 第3题:

    39、给定如下Java代码片段,编译运行时,结果是() int [ ] a = {1,2,3,4,5}; for (int count = 0 ; count<5; count++) System.out.print(a[count++]) ;

    A.运行时出现异常

    B.输出:12345

    C.输出:24

    D.输出:135


    C

  • 第4题:

    编译并运行下述程序段的结果是 public class Test{ public static void main(String argv[]){ int[] count = new int[4]; System.out.println(count[4]); } }

    A.编译错误

    B.运行错误

    C.输出0

    D.输出null


    A

  • 第5题:

    编译并运行下述程序段的结果是: public class Test{ public static void main(String argv[]){ int[] count = new int[4]; System.out.println(count[4]); } }

    A.编译时错误

    B.运行时错误

    C.输出0

    D.输出null


    A