亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mockcert03.txt

?? 一道JAVA方面的試題 很不錯的 我很喜歡
?? TXT
?? 第 1 頁 / 共 5 頁
字號:

Mutiple: 
1) private class MyClass extends Object
2) class myclass extends Object
3) public class MyClass
4) public class MyClass extends Object


Question 24
===========================================================
Once created, some Java objects are "immutable", meaning they can not have their contents changed. Which of the following classed produce immutable objects?

Mutiple: 
1) java.lang.Double
2) java.lang.StringBuffer
3) java.lang.Boolean
4) java.lang.Math


Question 25
===========================================================
Given the following class definitions:
1. class BaseWidget extends Object{
2.     String name="BaseWidget";
3.     void speak(){System.out.println("I am a "+name);}
4. }
5. class TypeAWidget extends BaseWidget{
6.     TypeAWidget()
       {name="TypeA";}
7. }

Which of the following code fragments will compile and execute without error?

Mutiple: 
1) Object A=new BaseWidget();
A.speak();
2) BaseWidget B=new TypeAWidget();
B.speak();
3) TypeAWidget C=new BaseWidget();
C.speak();


Question 26
===========================================================
Pick the keyword(s) which can NOT be used as modifiers in declaration of a method in a Java class.

Mutiple: 
1) private
2) friend
3) protected
4) static
5) synchronized  //答案不對吧?此字可以修飾method啊?


Question 27
===========================================================
Which of the following would be an illegal identifier for a Java method?

Mutiple: 
1) do_it_now
2) _Substitute
3) 9thMethod
4) $addMoney
5) %getPath


Question 28
===========================================================
Given the following code for the Demo class:

public class Demo{
  private int[] count;
  public Demo(){ count=new int[10];}
  public void setCount(int ct,int n){ count[n]=ct;}
  public void showCount(int n){
    System.out.println("Count is "+count[n]);
  }
  public int getCount(int n){ return count[n];}
}

what would be the result of calling the showCount method with a parameter of 9 immediately after creating an instance of Demo?

Mutiple: 
1) A NullPointerException would be thrown, halting the program.
2) Standard output would show "Count is 0".
3) An ArrayIndexOutOfBoundsException would be thrown, halting the program.
4) Standard output would show "Count is null".


Question 29
===========================================================
What happens when we attempt to compile and run the following code?
1. public class Logic{
2.   static long sixteen=0x0010;
3.   static public void main(String args[]){
4.     long N=sixteen>>4:
5.     System.out.println("N= "+N);
6.   }
7. }

Mutiple: 
1) The compiler will object to line 4 combining a long with an int.
2) The program will compile and run, producing the output "N=0".
3) The program will compile and run, producing the output "N=1".
4) A rutime exception will be thrown.


Question 30
===========================================================
What will happen on trying to compile and run the following application?
1. public class Example{
2.   public Boolean flags[]=new Boolean[4];
3.   public static void main(String[] args){
4.     Example E=new Example();
5.     System.out.println("Flag 1 is "+E.flags[1]);
6.   }
7. }

Mutiple: 
1) The text "Flag 1 is true" will be written to standard output.
2) The text "Flag 1 is false" will be written to standard output.
3) The text "Flag 1 is null" will be written to standard output.
4) The compiler will object to line 2.


Question 31
===========================================================
Which of the following code fragments are legal Java code?

Mutiple: 
1) String A="abcdefg"; 
A-="cde";
2) String A="abcdefg";
A+="cde";
3) Integer J=new Integer(27);
J-=7;
4) Integer J=new Integer(27);
J--;


Question 32
===========================================================
Given the following code for the code for Demo class, where "XXXX" represents an access modifier:

public class Demo extends Base{
  XXXX String userName;

  public void setName(String s){ userName=s;}

  public void showName(){
    System.out.println("Name is "+userName):
  }

  public String getName(){ return userName; }
}


Select the modifier which would be used to give only classes in the default package or classes derived from Demo, direct access to the userName String variable.

Mutiple: 
1) public
2) blank (ie - the line would read "String userName :")
3) protected
4) private


Question 33
===========================================================
Given the following method in an application:

1. public String setFiletype(String fname){
2.   int p=fname.indexOf('.');
3.   if(p>0) fname=fname.substring(0,p);
4.   fname+=".TXT";
5.   return fname;
6. }

and given that another part of the class has a the following code:

7. String TheFile="Program.java";
8. File F=new File(setFileType(TheFile));
9. System.out.println("Created "+TheFile);

What will be printed by the statement in line 9?

Mutiple: 
1) "Created Program.java"
2) "Created Program.txt"
3) "Created Program.java.txt"


Question 34
===========================================================
What happens on trying to compile and run the following code?
1. public class EqualsTest{
2.   public static void main(String args[]){
3.     byte A=(byte)4096;
4.     if(A==4096)System.out.println("Equal");
5.     else System.out.println("Not Equal");
6.   }
7. }

Mutiple: 
1) The compiler objects to the loss of accurcy in the cast in line 3.
2) The program compiles and prints "Not Equal".
3) The program compiles and prints "Equal".


Question 35
===========================================================
What happens on trying to compile and run the following code?

1. public class EqualsTest{
2.   public static void main(String args[]){
3.     Long LA=new Long(7);
4.     Long LB=new Long(7);
5.     if(LA==LB) System.out.println("Equal");
6.     else System.out.println("Not Equal");
7.   }
8. }

Mutiple: 
1) The program compiles but throws a runtime exception in line 5.
2) The program compiles and prints "Not Equal";
3) The program compiles and prints "Equal".


Question 36
===========================================================
Given the following code for the Demo class:

public class Demo extends Base{
  private int count;
  public Demo(){
    System.out.println("A Demo object has been created");
  }
  protected void addOne() {count++; }
}

Which of the following statements about the "count" variable is correct?

Mutiple: 
1) When a new Demo object is created, the value of count is zero.
2) When a new Demo object is created, the value of count is undefined.
3) An object of the Base class can have methods which modify the count variable.
4) The only way the count variable can be modified is by calling the addOne method.


Question 37
===========================================================
Which of the following statements will cause a compiler error.

Mutiple: 
1) float F=4096.0;
2) double D=4096.0;
3) byte B=4096;
4) char C=4096;


Question 38
===========================================================
In the following method, which may be called with any kind of Object, we want to "short circuit" the logical test in line 2 if the object is not a Long. Which logical operator should replace the X in line 2 to accomplish this?

1. long Test(Object ob){
2. if(Ob instanceof Long X ((Long)Ob).longValue()>999){
3.   return((Long)Ob).longValue();
4. }
5. return -1L;
6. }

Mutiple: 
1) Replace 'X' with '&&'.
2) Replace 'X' with '||'.
3) Replace 'X' with '&'.
4) Replace 'X' with '|'.


Question 39
===========================================================
Which of the following statements is the correct form fro determining whether the float primitive X has the specail "Not a Number" value?

Mutiple: 
1) if(X instanceof Float.NaN)
2) if(X==Float.NaN)
3) if(Float.isNaN(X))


Question 40
===========================================================
Which of the following are organizing principles of Java's "javadoc" format documentation for a given class?

Mutiple: 
1) Relative frequency of use of the various methods.
2) Lists of methods in a class in alphabetic order.
3) Separate listing of private, protected and public methods in a calss.


Question 41
===========================================================
The following program is compiled and then run with this command line:

java Demo alpha beta gamma 

public class Demo{
  public static void main(String args[]){
    int n=3;
    System.out.println("The word is "+args[n]);
  }
}

What happens?

Mutiple: 
1) "The word is beta" is written to standard output.
2) "The word is gamma" is written to standard output.
3) The runtime system reports an ArrayIndexOutOfBoundsException in the main method.
4) The runtime system reports a NullPointerException in the main method.


Question 42
===========================================================
What will be the result of running the following method with an input of 67?

public int MaskOff(int N){
  return N^3;
}

Mutiple: 
1) The method will return 3.
2) The method will return 64.
3) The method will return 67.
4) The method will return 0.


Question 43
===========================================================
What happens on trying to compile and run the following code?

public class EqualsTest{
  public static void main(String args[]){
    char A='\u0005';
    if(A==0x0005L) System.out.println("Equal");
    else System.out.println("Not Equal");
  }
}

Mutiple: 
1) The compiler reports "Invalid character in input" in line 3.
2) The program compiles and prints "Not Equal".
3) The program compiles and prints "Equal".


Question 44
===========================================================
Which of the following Java statements correctly declare an array of int primitives?

Mutiple: 
1) int scores[];
2) int[] scores;
3) int scores={0,0,0,0};


Question 45
===========================================================
Assume that the following program has been compiled and the Demo.class file is in the current directory.

public class Demo{
  public static void main(String args[]){
    int n=1;
    System.out.println("The word is "+args[n]);
  }
}

Select the correct command line to execute the program and produce the following output line: "The word is gamma"

Mutiple: 
1) Demo alpha beta gamma delta
2) java Demo alpha beta gamma delta
3) java Demo beta gamma delta
4) java Demo.class beta gamma delta
5) java Demo.class alpha beta gamma delta


Question 46
===========================================================
What happens on trying to compile and run the following code?

public class EqualsTest{
  public static void main(String args[]){
    Object A=new Long(7);
    Long L=new Long(7);
    if(A.equals(L)) System.out.println("Equal");
    else System.out.println("Not Equal");
  }
}

Mutiple: 
1) The program compiles and prints "Equal".
2) The program compiles and prints "Not Equal".
3) The compiler objects to line 5.
4) A runtime cast error occurs at line 5.


Question 47
===========================================================
What will be the result of compiling the following code?

public class SiteInfo{
  String webSite="http://www.lanw.com"+'/'+"default.htm";
  public String getSite(){
    return webSite;
  }
}

Mutiple: 
1) The code will compile without problem.
2) The compiler will report an error " ':' expected" for the statement in line 2.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日本在线看| 日韩精品欧美精品| 国产欧美中文在线| 国产一区二区电影| 日韩午夜激情免费电影| 午夜天堂影视香蕉久久| 日韩和欧美一区二区三区| 一区二区三区在线免费观看 | 麻豆中文一区二区| 制服丝袜亚洲色图| 国产一区二区网址| 粉嫩嫩av羞羞动漫久久久 | 在线观看日韩电影| 天使萌一区二区三区免费观看| 亚洲视频香蕉人妖| 欧美精品久久99久久在免费线| 韩国一区二区视频| 中文字幕中文字幕在线一区| 欧美视频中文一区二区三区在线观看| 久久你懂得1024| 国产精品综合av一区二区国产馆| 国产蜜臀97一区二区三区| 国产精品入口麻豆九色| 99国产欧美久久久精品| 三级久久三级久久久| 九九九久久久精品| 午夜精品一区在线观看| 美女尤物国产一区| 波多野结衣中文字幕一区| 天堂蜜桃一区二区三区| 国产乱淫av一区二区三区| 成人的网站免费观看| 欧美亚洲丝袜传媒另类| 91麻豆精品国产91久久久久久| 久久综合久久鬼色中文字| 欧美日韩一区三区| 色噜噜久久综合| 国产成人丝袜美腿| 青青草一区二区三区| 午夜精品福利一区二区三区av| 久久99久国产精品黄毛片色诱| www.欧美日韩| 成人在线视频一区| 国产拍揄自揄精品视频麻豆| 大胆欧美人体老妇| 欧美色视频一区| 国产精品三级电影| 国内精品嫩模私拍在线| 91成人国产精品| 中文字幕不卡三区| 精品嫩草影院久久| 欧美老肥妇做.爰bbww视频| 国产三级精品在线| 免费一级片91| 欧美最猛性xxxxx直播| 久久精品在线免费观看| 亚洲国产经典视频| 蜜桃一区二区三区在线| 欧美性xxxxxxxx| 国产精品五月天| 免费美女久久99| 欧美一区二区三区系列电影| 欧美一区二区在线免费播放| 亚洲欧洲综合另类| 一区二区三区中文字幕| 成人黄色网址在线观看| 久久久久久久免费视频了| 日韩电影免费在线看| 久久精品国产亚洲5555| 国产91精品一区二区麻豆亚洲| 欧美一个色资源| 日韩在线卡一卡二| 欧美人与禽zozo性伦| 亚洲一卡二卡三卡四卡无卡久久 | 亚洲欧美国产毛片在线| 5858s免费视频成人| 亚洲精品亚洲人成人网在线播放| 日韩免费成人网| 日韩精品一区二区三区四区 | 欧美色图激情小说| 亚洲综合男人的天堂| 欧洲色大大久久| 一区二区三区四区乱视频| 91久久精品一区二区三| 亚洲一区在线观看免费| 欧美日韩国产天堂| 免费精品视频在线| 久久午夜羞羞影院免费观看| 国产自产高清不卡| 国内久久婷婷综合| 成+人+亚洲+综合天堂| 欧美中文字幕一区二区三区| 亚洲精品国产a久久久久久| 欧美性受xxxx黑人xyx性爽| 亚洲一区二区在线免费观看视频| 欧洲精品一区二区三区在线观看| 亚洲成a人片在线观看中文| 青草国产精品久久久久久| 日韩一区二区三区免费观看| 日韩高清国产一区在线| 精品国产免费一区二区三区四区| 337p粉嫩大胆噜噜噜噜噜91av| 国产电影一区在线| 国产精品无码永久免费888| www.亚洲在线| 一区二区在线观看不卡| 欧美在线三级电影| 国产精品国产三级国产普通话99| 成人av第一页| 一区二区三区成人| 不卡电影一区二区三区| 这里只有精品99re| 黄色小说综合网站| 中文字幕乱码久久午夜不卡| 韩国欧美国产1区| 亚洲综合视频在线| 亚洲无人区一区| 美国十次综合导航| 精品国产免费人成电影在线观看四季| 五月天精品一区二区三区| 欧美一区二区三区四区视频| 福利视频网站一区二区三区| 国产精品女主播av| 欧美日韩成人综合| 99免费精品在线观看| 香蕉久久夜色精品国产使用方法 | 国产精品视频第一区| 91在线精品一区二区| 日韩和欧美一区二区| 国产欧美日韩综合精品一区二区| 91亚洲资源网| 日韩经典一区二区| 亚洲综合久久久| 久久人人爽人人爽| 欧美午夜一区二区| 石原莉奈在线亚洲三区| 欧美精品在线观看播放| 国产精品欧美久久久久一区二区| 91麻豆精品国产91久久久久久| 懂色av一区二区三区蜜臀| 国产清纯美女被跳蛋高潮一区二区久久w | 国产99久久久精品| 亚洲网友自拍偷拍| 国产精品区一区二区三区| 日产精品久久久久久久性色| 国内不卡的二区三区中文字幕 | 成人国产亚洲欧美成人综合网| 偷拍一区二区三区| 蜜乳av一区二区| 在线不卡免费欧美| 国产一区二区三区蝌蚪| 亚洲第一在线综合网站| 中文字幕一区三区| 欧美三级蜜桃2在线观看| 亚洲18女电影在线观看| 日韩一区欧美小说| 久久久精品国产免大香伊| 久久久久高清精品| 欧美日韩一区二区三区高清| 成人精品在线视频观看| 日韩精品亚洲专区| 午夜一区二区三区在线观看| 欧美三级三级三级爽爽爽| 欧美丝袜丝交足nylons图片| 国产精品91一区二区| 不卡的av电影在线观看| 九色综合国产一区二区三区| 国产精品88av| 亚洲福利国产精品| 亚洲成人免费视| 久久99精品国产.久久久久久| 亚洲一区在线视频| 综合久久给合久久狠狠狠97色 | 日韩美女一区二区三区| 日本视频在线一区| 日韩电影免费一区| 国产资源在线一区| 国产成人在线影院| 日本精品一区二区三区四区的功能| av福利精品导航| 欧美日本韩国一区二区三区视频 | 亚洲精品成a人| 亚洲国产一区二区在线播放| 洋洋av久久久久久久一区| 国产精品网站一区| 亚洲欧美在线视频| 日韩在线一二三区| 国内成+人亚洲+欧美+综合在线| 99久久久免费精品国产一区二区| 91亚洲国产成人精品一区二三 | 五月天亚洲婷婷| 国产揄拍国内精品对白| 成人午夜大片免费观看| 在线视频欧美精品| 日韩精品一区二区三区swag| 一区二区三区免费| 日日摸夜夜添夜夜添精品视频| 黑人巨大精品欧美黑白配亚洲| 色中色一区二区| 欧美日韩免费一区二区三区视频|