Java考試格林練習題

時間:2024-07-18 23:21:03 JAVA認證 我要投稿
  • 相關推薦

Java考試格林練習題

  question 11)

Java考試格林練習題

  what will be the result of attempting to compile and run the following code?

  abstract class minebase { abstract void amethod(); static int i;}public class mine extends minebase { public static void main(string argv[]){ int[] ar=new int[5]; for(i=0;i < ar.length;i++) system.out.println(ar[i]); }}

  1) a sequence of 5 0’s will be printed

  2) error: ar is used before it is initialized

  3) error mine must be declared abstract

  4) indexoutofboundes error

  question 12)

  what will be printed out if you attempt to compile and run the following code ?

  int i=1; switch (i) { case 0: system.out.println("zero"); break; case 1: system.out.println("one"); case 2: system.out.println("two"); default: system.out.println("default"); }

  1) one

  2) one, default

  3) one, two, default

  4) default

  question 13)

  what will be printed out if you attempt to compile and run the following code?

  int i=9;switch (i) { default: system.out.println("default"); case 0: system.out.println("zero"); break; case 1: system.out.println("one"); case 2: system.out.println("two");}

  1) default

  2) default, zero

  3) error default clause not defined

  4) no output displayed

【Java考試格林練習題】相關文章:

Java考試格林模擬試題03-23

java認證考試介紹03-19

java考試習題及答案03-26

JAVA認證考試細則03-19

JAVA語言程序設計練習題03-26

2017年java筆試練習題03-07

sun java認證考試介紹03-19

java認證考試細則介紹03-19

java考試試題及答案10-25

亚洲制服丝袜二区欧美精品,亚洲精品无码视频乱码,日韩av无码一区二区,国产人妖视频一区二区
日韩女同一区二区三区 | 日韩1区2区3区蜜桃在线观看 | 亚洲精品精品国产一线久久 | 亚洲国产日韩在线成人蜜芽 | 亚洲图丁香五月天婷婷 | 日本一区二区精品偷拍 |