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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mockcert04.txt

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

public class Test extends Applet{

          public void init(){

               setLayout(new BorderLayout());

               add("South", new Button("B1"));

               add("North", new Button("B2"));

               add("South", new Button("B3"));

               }

          }


Select the correct statements regarding the above

Mutiple: 
1) There are 2 buttons displayed in the SOUTH section, B1 and B3.
2) Only B3 is displayed in the SOUTH section.
3) An exception is thrown when an attempt is made to add a second component to SOUTH.
4) Only B1 is displayed in the SOUTH section.
5) You can't add buttons to applets.


Question 20
===========================================================
What is displayed when the following piece of code is executed:


1. String val = null;

2. int x = Integer.parseInt(val);

3.

4. System.out.println(x);

Mutiple: 
1) 0
2) null
3) A NumberFormatException is thrown at line 2.
4) Nothing is displayed


Question 21
===========================================================
Consider the following piece of code:


class A{

     int x = 0;

     A(int w){

         x = w;

     }

}


class B extends A{

     int x = 0;

     B(int w){

         x = w +1;

     }

}

Mutiple: 
1) The code compiles correctly.
2) The code fails to compile, because both class A and B do not have valid constructors.
3) The code fails to compile because there is no default no-args constructor for class A.


Question 22
===========================================================
Given an object myListener (whose class implements the ActionListener interface), which of the following are valid ways to enable myListener to receive all action events from component smallButton?

Mutiple: 
1) smallButton.add(myListener);
2) smallButton.addListener(myListener);
3) smallButton.addActionListener(myListener);
4) smallButton.addItem(myListener);


Question 23
===========================================================
Which of the following are valid listener interfaces?

Mutiple: 
1) ActionListener
2) MouseMotionListener
3) SystemEventListener
4) MouseClickListener
5) WindowListener


Question 24
===========================================================
Which of the following is the correct way to set the foreground colour of a component, c.

Mutiple: 
1) c.setForeground("red");
2) c.setColor("Color.red");
3) c.Foreground(Color.red);
4) c.setForegroundColor("red");
5) c.setForeground(Color.red);


Question 25
===========================================================
Which of the following are valid ways to create a Map collection.

Mutiple: 
1) Map m = new Map();
2) Map m = new Map(init capacity, increment capacity);
3) Map m = new Map(new Collection());
4) Map is an interface, and cannot be instantiated.


Question 26
===========================================================
Select all the correct statements relating to the following piece of code?


1.  public class A{

2.      abstract int method();

3.      void anotherMethod(){

4.       }

5.

6.  class B extends A{

7.      int method(){

8.          return 2;

9.      }

10. }

Mutiple: 
1) Changing "extends" to "implements" on line 6 will allow the code to compile correctly.
2) The method() in class A cannot be abstract without the entire class being declared as abstract.
3) Declaring class A to be abstract will allow the code to compile correctly.
4) The class A must have an explicit default constructor in order for it to be subclassed correctly.
5) The code fails to compile, because class B does not implement anotherMethod().


Question 27
===========================================================
Which layout manager do the comments below refer to:


All components contained in it have the same width and height. Contained components are stretched to have the same dimensions.

Mutiple: 
1) FlowLayout
2) BorderLayout
3) GridLayout


Question 28
===========================================================
Select all valid statements.

Mutiple: 
1) When typing text into a TextField, scroll bars will automatically appear when the TextField becomes full.
2) When typing text into a TextArea, scroll bars will appear when text is typed past the boundaries of the TextArea.
3) TextFields can have more than 1 row of text.
4) The class TextArea is a super class of the class TextField.
5) Both TextAreas and TextFields have a method called setEditable(), which can enable or disable editingof the component.


Question 29
===========================================================
In which class is the paint() method defined?

Mutiple: 
1) Object
2) Applet
3) Component
4) Thread
5) Graphics


Question 30
===========================================================
Select the statement which most closely describes the user interface of an applet with the following init() method:


public void init(){

     Panel p = new Panel();

     p.setLayout(new BorderLayout());

     p.add(new Button("Hello"), BorderLayout.EAST);

     p.add(new Button("Bye"), BorderLayout.WEST);

     add(p);

}

Mutiple: 
1) Two buttons are displayed. A button with "Hello" is on the right side of the applet. The button with "Bye" is on the left side of the applet. Both buttons extend from the centre of the applet to each side, and are the height of the applet.
2) Two buttons are displayed. A button with "Hello" is on the right side of the applet. The button with "Bye" is on the left side of the applet. Both buttons are only as wide as the text on the button, but are the height of the applet.
3) Two buttons are displayed. A button with "Hello" is on the right side of the applet. The button with "Bye" is on the left side of the applet. Both buttons are only large enough to support the associated button texts.


Question 31
===========================================================
What is wrong about the following piece of code (assume the relevant import statements are present):


public class Test{

     public static void main (String [] args) throws IOException{

         if (args[0] == "hello")

             throw new IOException();

     }

}

Only One: 
1) Nothing. The code compiles correctly.
2) The code fails to compile. You can't throw an exception from the main() method.
3) The code fails to compile. IOException is a system exception, and cannot be thrown by application code.


Question 32
===========================================================
Consider the following piece of code, and select the statements which are true.


class Test{

     int x = 5;

     static String s = "abcd";


     public static void method(){

         System.out.println(s + x);

     }

}

Mutiple: 
1) The code compiles and displays "abcd5".
2) The code compiles, but throws an exception at runtime, because variable x isn't declared as static.
3) The code fails to compile because you can't make a static reference to a non-static variable.
4) The code will compile and display "abcd5" if x is declared to be static.
5) The code will compile by removing the static keyword from the declaration of method().


Question 33
===========================================================
Select all legal code fragments from the following.

Mutiple: 
1) char c = "c";
2) Boolean b = new Boolean("qwerty");
3) String s = "null";
4) int q;
for (int p = 0, q = 0; p < 5; p++){
  System.out.println("Val = " + p + q);
}
5) int x = 3; 
Float f = new Float(x);


Question 34
===========================================================
Which of the following are legal ways to construct a RandomAccessFile?

Mutiple: 
1) RandomAccessFile("file", "r");
2) RandomAccessFile("r", "file");
3) RandomAccessFile('r', "file");
4) RandomAccessFile("file", 'r');
5) RandomAccessFile("file", "rw");


Question 35
===========================================================
Consider the following code and select the most appropriate statements.


1. class Test{

2.    public int doubleValue(int a)

3.         System.out.println(a);

4.         return (int)(a * 2);

5     }

6.

7     public float doubleValue(int a){

8.         System.out.println(a);

9.         return (float)(a * 2);

10.   }

11.}

Mutiple: 
1) The code compiles since the two doubleVal() methods  have different return types.
2) The code doesn't compile because the compiler sees two methods with the same signature.
3) The code can be made to compile by redefining the parameter for doubleVal() on line 7 to be "float a" instead of "int a".
4) The code can be made to compile by replacing the  public declaration on line 7 with private.


Question 36
===========================================================
What is displayed when the following piece of code is executed:


class Test extends Thread{

     public void run(){

         System.out.println("1");

         yield();

         System.out.println(2");

         suspend();

         System.out.println("3");

         resume();

         System.out.println("4");

     }


     public static void main(String []args){

         Test t = new Test();

         t.start();

     }

}

Mutiple: 
1) 1 
2 
3 
4
2) 1 
2 
3
3) 1 
2
4) Nothing. This is not a valid way to create and start a thread.
5) 1


Question 37
===========================================================
Consider the following piece of code, and select the most appropriate statements.


TextField t = new TextField("Hello", 20);

Mutiple: 
1) The user will be able to edit the string.
2) The field will be 20 characters wide.
3) The text field will be same size on all platforms, since Java is platform independent.
4) When entering text into the field, only 20 characters can be entered.
5) If the font is changed, the size of the textfield will adjust to allow 20 characters to be displayed.


Question 38
===========================================================
True of False.


Using the instanceof operator on an interface will cause a runtime exception.

Only One: 
1) True
2) False


Question 39
===========================================================
Which of the following are valid ways to create a Button component?

Mutiple: 
1) new Button();
2) new Button(30, 10);  where 30 is the width of the button and 10 is the height
3) new Button("hello");
4) new Button(new String("hello"));
5) new Button(String("hello"));


Question 40
===========================================================
Which of the following are NOT valid subclasses of AWTEvent?

Mutiple: 
1) MouseClickEvent
2) OutputEvent
3) MouseMotionEvent
4) KeyAdapter
5) WindowMinimizeEvent


Question 41
===========================================================
Which of the following are valid methods for the Graphics class?

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲一区字幕| 1区2区3区精品视频| 色婷婷综合中文久久一本| 日欧美一区二区| 亚洲精选免费视频| 亚洲一区二区视频在线| 久久久久久亚洲综合影院红桃 | 成人免费电影视频| 日韩专区欧美专区| 日韩黄色小视频| 石原莉奈一区二区三区在线观看| 亚洲精品国产品国语在线app| 国产日韩欧美制服另类| 国产丝袜美腿一区二区三区| 久久综合色婷婷| 国产欧美一区在线| 国产精品色哟哟网站| 国产欧美精品一区aⅴ影院| 久久久亚洲精品一区二区三区| 日韩欧美一级二级| 国产女人aaa级久久久级| 国产精品美女www爽爽爽| 国产精品久久久久久久久动漫| 久久久久久免费网| 中文字幕精品综合| 亚洲一区视频在线| 麻豆91精品91久久久的内涵| 国产一区二区美女| 99久久综合狠狠综合久久| 色婷婷综合中文久久一本| 欧美综合在线视频| 久久综合九色综合欧美98| 国产精品每日更新| 亚洲成人在线网站| 国产精品99久久久久久有的能看| 波多野结衣精品在线| 欧美日韩在线三级| 日韩三级.com| 夜夜亚洲天天久久| 国产乱子轮精品视频| 在线欧美小视频| 国产精品私人影院| 免费不卡在线观看| 精品日韩一区二区三区免费视频| 欧美电视剧在线看免费| 亚洲精品视频在线观看网站| 狠狠久久亚洲欧美| 欧美美女喷水视频| 中文字幕一区二区三区四区| 久久99精品国产麻豆婷婷洗澡| 97国产精品videossex| 久久久久久免费毛片精品| 亚洲图片欧美视频| 91免费观看视频| 国产欧美日韩综合精品一区二区| 热久久一区二区| 337p亚洲精品色噜噜狠狠| 亚洲一区二区偷拍精品| 91麻豆精品在线观看| 国产欧美日韩不卡| 成人三级伦理片| 国产欧美日本一区视频| 国产综合久久久久久久久久久久| 色香蕉成人二区免费| 国产精品福利电影一区二区三区四区| 国产在线视频精品一区| 日韩免费观看2025年上映的电影| 亚洲国产中文字幕| 欧美性色欧美a在线播放| 一区二区三区成人在线视频| 91麻豆国产香蕉久久精品| 亚洲丝袜美腿综合| 在线精品视频一区二区三四| 亚洲免费资源在线播放| 久久在线免费观看| 国产乱一区二区| 亚洲欧美在线观看| 在线观看日韩高清av| 亚洲国产精品嫩草影院| 欧美一级xxx| 久久精品国内一区二区三区| 久久综合九色综合97_久久久| 国产麻豆精品视频| 中文字幕一区二区三区精华液| 成人h动漫精品一区二| 亚洲最快最全在线视频| 欧美一区二区三区在线看| 国产成人在线免费| 亚洲图片自拍偷拍| 国产午夜亚洲精品午夜鲁丝片| 波多野结衣亚洲| 美国十次综合导航| 成人欧美一区二区三区1314| 欧美日韩一区二区三区四区五区| 国产一区二区三区黄视频| 一级精品视频在线观看宜春院| 亚洲你懂的在线视频| 色综合天天性综合| 国产精品一二三四五| 日韩福利视频导航| 国产精品久久久久四虎| 日韩欧美国产麻豆| 欧美日韩中文一区| 99精品热视频| 国产精品99久久久久久宅男| 日韩成人免费电影| 亚洲午夜精品在线| 亚洲综合在线视频| 国产欧美va欧美不卡在线| 欧美精品一区二区三区高清aⅴ| 欧美在线|欧美| 91在线观看一区二区| 国产成人在线视频播放| 国产精品911| 国产91丝袜在线播放| 国产剧情一区在线| 国产成人在线视频网址| 国产91清纯白嫩初高中在线观看| 欧美三级电影网| 91在线观看免费视频| 91一区二区在线| 欧美综合欧美视频| 欧美精品久久久久久久多人混战| 欧美日韩不卡一区| 欧美一区二区观看视频| 日韩欧美不卡在线观看视频| 精品国产伦理网| 国产精品久久久久影院亚瑟| 国产精品麻豆欧美日韩ww| 中文字幕一区二区三| 一区二区三区在线播| 亚洲成人自拍一区| 久久99国产精品免费网站| 成人午夜免费电影| 欧美日韩国产首页在线观看| 欧美大片日本大片免费观看| 国产午夜亚洲精品不卡| 亚洲最新视频在线播放| 久久精品国产在热久久| 色综合久久天天| 欧美白人最猛性xxxxx69交| 国产精品麻豆网站| 久久精品国产99久久6| gogo大胆日本视频一区| 91精品国产一区二区三区香蕉| 国产精品国产自产拍高清av| 亚洲444eee在线观看| 国产精品系列在线播放| 91精品国产色综合久久不卡蜜臀| 国产精品青草综合久久久久99| 五月婷婷激情综合| 99精品国产91久久久久久| 2023国产精品自拍| 丝袜亚洲另类欧美| 在线一区二区三区四区| 久久综合999| 国内精品视频666| 6080国产精品一区二区| 亚洲精品视频一区| gogogo免费视频观看亚洲一| 欧美成人性福生活免费看| 日韩和欧美一区二区| 欧美日韩一区三区| 亚洲国产精品综合小说图片区| 欧美一级xxx| 婷婷综合久久一区二区三区| 色综合久久综合网97色综合 | 欧美美女网站色| 亚洲尤物在线视频观看| 欧美亚洲日本国产| 亚洲在线中文字幕| 欧美在线短视频| 日韩激情视频在线观看| 91精品中文字幕一区二区三区| 婷婷综合五月天| 日韩欧美国产1| 国产1区2区3区精品美女| 中文在线资源观看网站视频免费不卡| 九九精品一区二区| 久久久久久久久一| 97精品久久久午夜一区二区三区| 欧美国产精品中文字幕| 色综合久久九月婷婷色综合| 一区二区在线电影| 日韩视频国产视频| 国产毛片精品视频| 亚洲老司机在线| 91麻豆精品国产91久久久久| 蜜桃视频在线观看一区| 中文在线一区二区| 欧美午夜理伦三级在线观看| 老司机免费视频一区二区三区| 久久综合五月天婷婷伊人| 99久久精品国产网站| www.久久精品| 一区二区三区精品在线| 欧美岛国在线观看| 91视频观看视频| 国产主播一区二区三区| 亚洲与欧洲av电影|