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

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

?? mockcert06.txt

?? 一道JAVA方面的試題 很不錯的 我很喜歡
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
 1. class Greebo extends java.util.Vector
 2.   implements Runnable {
 3.     public void run(String message) {
 4.       System.out.println("in run() method: " +
 5.       message);
 6.   }
 7. }
 8.
 9. class GreeboTest {
10.   public static void main(String args[]) {
12.     Greebo g = new Greebo();
13.     Thread t = new Thread(g);
14.     t.start();
15.   }
16. }

Only One: 
1) There will be a compiler error, because class Greebo does not correctly implement the Runnable interface.
2) There will be a compiler error at line 13, because you cannot pass a parameter to the constructor of a Thread.
3) The code will compile correctly but will crash with an exception at line 13.
4) The code will compile correctly but will crash with an exception at line 14.
5) The code will compile correctly and will execute without throwing any exceptions.


Question 60
===========================================================
Which one statement below is always true about the following application?

 1. class HiPri extends Thread {
 2.   HiPri() {
 3.     setPriority(10);
 4.   }
 5.
 6.   public void run() {
 7.     System.out.println(
 8.       "Another thread starting up.");
 9.     while (true) { }
10.   }
11.
12.   public static void main(String args[]) {
13.     HiPri hp1 = new HiPri();
14.     HiPri hp2 = new HiPri();
15.     HiPri hp3 = new HiPri();
16.     hp1.start();
17.     hp2.start();
18.     hp3.start();
19.   }
20. }

Only One: 
1) When the application is run, thread hp1 will execute; threads hp2 and hp3 will never get the CPU.
2) When the application is run, all three threads (hp1, hp2, and hp3) will get to execute, taking time-sliced turns in the CPU.
3) Either A or B will be true, depending on the underlying platform.


Question 61
===========================================================
True or false: A thread wants to make a second thread ineligible for execution. To do this, the first thread can call the yield() method on the second thread.

Only One: 
1) True
2) False


Question 62
===========================================================
A thread's run() method includes the following lines:

1. try {
2.   sleep(100);
3. } catch (InterruptedException e) { }
Assuming the thread is not interrupted, which one of the following statements is correct?

Only One: 
1) The code will not compile, because exceptions may not be caught in a thread's run() method.
2) At line 2, the thread will stop running. Execution will resume in, at most, 100 milliseconds.
3) At line 2, the thread will stop running. It will resume running in exactly 100 milliseconds.
4) At line 2, the thread will stop running. It will resume running some time after 100 milliseconds have elapsed.


Question 63
===========================================================
A monitor called mon has 10 threads in its waiting pool; all these waiting threads have the same priority. One of the threads is thr1. How can you notify thr1 so that it alone moves from the Waiting state to the Ready state?

Only One: 
1) Execute notify(thr1); from within synchronized code of mon.
2) Execute mon.notify(thr1); from synchronized code of any object.
3) Execute thr1.notify(); from synchronized code of any object.
4) Execute thr1.notify(); from any code (synchronized or not) of any object.
5) You cannot specify which thread will get notified.


Question 64
===========================================================
If you attempt to compile and execute the application listed below, will it ever print out the message In xxx?

 1. class TestThread3 extends Thread {
 2.   public void run() {
 3.     System.out.println("Running");
 4.     System.out.println("Done");
 5.   }
 6.
 7.  private void xxx() {
 8.    System.out.println("In xxx");
 9.  }
10.
11.   public static void main(String args[]) {
12.     TestThread3 ttt = new TestThread3();
13.     ttt.xxx();
14.     ttt.start();
12.   }
13. }

Only One: 
1) Yes
2) No


Question 65
===========================================================
True or false: A Java monitor must either extend Thread or implement Runnable.

Only One: 
1) True
2) False


Question 66
===========================================================
Given a string constructed by calling s = new String("xyzzy"), which of the calls listed below modify the string? (Choose all that apply.)

Only One: 
1) s.trim();
2) s.substring(3);
3) s.replace(`z', `a');
4) s.concat(s);
5) None of the above


Question 67
===========================================================
Which one statement is true about the code below?

1. String s1 = "abc" + "def";
2. String s2 = new String(s1);
3. if (s1 == s2)
4.   System.out.println("== succeeded");
5. if (s1.equals(s2))
6.   System.out.println(".equals() succeeded");

Only One: 
1) Lines 4 and 6 both execute.
2) Line 4 executes, and line 6 does not.
3) Line 6 executes, and line 4 does not.
4) Neither line 4 nor line 6 executes.


Question 68
===========================================================
Suppose you want to write a class that offers static methods to compute hyperbolic trigonometric functions. You decide to subclass java.lang.Math and provide the new functionality as a set of static methods. Which one statement below is true about this strategy?

Only One: 
1) The strategy works.
2) The strategy works, provided the new methods are public.
3) The strategy works, provided the new methods are not private.
4) The strategy fails, because you cannot subclass java.lang.Math.
5) The strategy fails, because you cannot add static methods to a subclass.


Question 69
===========================================================
Which one statement is true about the code fragment below?

1. import java.lang.Math;
2. Math myMath = new Math();
3. System.out.println("cosine of 0.123 = " + 
4.   myMath.cos(0.123));

Only One: 
1) Compilation fails at line 2.
2) Compilation fails at line 3 or 4.
3) Compilation succeeds, although the import on line 1 is not necessary. During execution, an exception is thrown at line 3 or 4.
4) Compilation succeeds. The import on line 1 is necessary. During execution, an exception is thrown at line 3 or 4.
5) Compilation succeeds, and no exception is thrown during execution.


Question 70
===========================================================
Which one statement is true about the code fragment below?

1. String s = "abcde";
2. StringBuffer s1 = new StringBuffer("abcde");
3. if (s.equals(s1))
4.   s1 = null;
5. if (s1.equals(s))
6.   s = null;

Only One: 
1) Compilation fails at line 1, because the String constructor must be called explicitly.
2) Compilation fails at line 3, because s and s1 have different types.
3) Compilation succeeds. During execution, an exception is thrown at line 3.
4) Compilation succeeds. During execution, an exception is thrown at line 5.
5) Compilation succeeds. No exception is thrown during execution.


Question 71
===========================================================
True or false: In the code fragment below, after execution of line 1, sbuf references an instance of the StringBuffer class. After execution of line 2, sbuf still references the same instance.

1. StringBuffer sbuf = new StringBuffer("abcde");
2. sbuf.insert(3, "xyz");

Only One: 
1) True
2) False


Question 72
===========================================================
True or false: In the code fragment below, after execution of line 1, sbuf references an instance of the StringBuffer class. After execution of line 2, sbuf still references the same instance.

1. StringBuffer sbuf = new StringBuffer("abcde");
2. sbuf.append("xyz");

Only One: 
1) True
2) False


Question 73
===========================================================
True or false: In the code fragment below, line 4 is executed.

1. String s1 = "xyz";
2. String s2 = "xyz";
3. if (s1 == s2)
4.   System.out.println("Line 4");

Only One: 
1) True
2) False


Question 74
===========================================================
True or false: In the code fragment below, line 4 is executed.

1. String s1 = "xyz";
2. String s2 = new String(s1);
3. if (s1 == s2)
4.   System.out.println("Line 4");

Only One: 
1) True
2) False


Question 75
===========================================================
Which would be most suitable for storing data elements that must not appear in the store more than once, if searching is not a priority?

Only One: 
1) Collection
2) List
3) Set
4) Map
5) Vector


Question 76
===========================================================
A Java program creates a check box using the code listed below. The program is run on two different platforms. Which of the statements following the code are true? (Choose one or more.)

1. Checkbox cb = new Checkbox("Autosave");
2. Font f = new Font("Courier", Font.PLAIN, 14);
3. cb.setFont(f);

Mutiple: 
1) The check box will be the same size on both platforms, because Courier is a standard Java font.
2) The check box will be the same size on both platforms, because Courier is a fixed-width font.
3) The check box will be the same size on both platforms, provided both platforms have identical 14-point plain Courier fonts.
4) The check box will be the same size on both platforms, provided both platforms have identical check-box decorations.
5) There is no way to guarantee that the check boxes will be the same size on both platforms.


Question 77
===========================================================
What is the result of attempting to compile and execute the following application under JDK 1.2 or later?

 1. import java.awt.*;
 2.
 3. public class Q2 extends Frame {
 4.   Q2() {
 5.     setSize(300, 300);
 6.     Button b = new Button("Apply");
 7.     add(b);
 8.   }
 9.
10.   public static void main(String args[]) {
11.     Q2 that = new Q2();
12.     that.setVisible(true);
13.   }
14. }

Only One: 
1) There is a compiler error at line 11, because the constructor on line 4 is not public.
2) The program compiles but crashes with an exception at line 7, because the frame has no layout manager.
3) The program displays an empty frame.
4) The program displays the button, using the default font for the button label. The button is just large enough to encompass its label.
5) The program displays the button, using the default font for the button label. The button occupies the entire frame.


Question 78
===========================================================
What is the result of compiling and running the following application?

 1. import java.awt.*;
 2.
 3. public class Q3 extends Frame {
 4.   Q3() {
 5.     // Use Grid layout manager.
 6.     setSize(300, 300);
 7.     setLayout(new GridLayout(1, 2));
 8.
 9.     // Build and add 1st panel.
10.     Panel p1 = new Panel();
11.     p1.setLayout(
12.       new FlowLayout(FlowLayout.RIGHT));
13.     p1.add(new Button("Hello"));
14.     add(p1);
15.
16.     // Build and add 2nd panel.
17.     Panel p2 = new Panel();
18.     p2.setLayout(
19.       new FlowLayout(FlowLayout.LEFT));
20.     p2.add(new Button("Goodbye"));
21.     add(p2);
22.   }
23.
24.   public static void main(String args[]) {
25.     Q3 that = new Q3();
26.     that.setVisible(true);
27.   }
28. }

Only One: 
1) The program crashes with an exception at line 7, because the frame's default layout manager cannot be overridden.
2) The program crashes with an exception at line 7, because a Grid layout manager must have at least two rows and two columns.
3) The program displays two buttons, which are just large enough to encompass their labels. The buttons appear at the top of the frame. The "Hello" button is just to the left of the vertical midline of the frame; the "Goodbye" button is just to the right of the vertical midline of the frame.
4) The program displays two large buttons. The "Hello" button occupies the entire left half of the frame, and the "Goodbye" button occupies the entire right half of the frame.
5) The program displays two buttons, which are just wide enough to encompass their labels. The buttons are as tall as the frame. The "Hello" button is just to the left of the vertical midline of the frame; the "Goodbye" button is just to the right of the vertical midline of the frame.


Question 79
===========================================================
Please select correct answer:

Only One: 
1) Each button is as wide as the frame and is just tall enough to encompass its label. The "Alpha" button is at the top of the frame. The "Beta" button is in the middle. The "Gamma" button is at the bottom.
2) Each button is as wide as the frame. The "Alpha" button is at the top of the frame and is just tall enough to encompass its label. The "Beta" button is in the middle of the frame; its height is approximately one-third the height of the frame. The "Gamma" button is at the bottom of the frame and is just tall enough to encompass its label.
3) Each button is just wide enough and just tall enough to encompass its label. All three buttons are centered horizontally. The "Alpha" button is at the top of the frame. The "Beta" button is in the middle. The "Gamma" button is at the bottom.
4) Each button is just wide enough to encompass its label. All three buttons are centered horizontally. The "Alpha" button is at the top of the frame and is just tall enough to encompass its label. The "Beta" button is in the middle of the frame; its height is approximately one-third the height of the frame. The "Gamma" button is at the bottom of the frame and is just tall enough to encompass its label.
5) Each button is as tall as the frame and is just wide enough to encompass its label. The "Alpha" button is at the left of the frame. The "Beta" button is in the middle. The "Gamma" button is at the right.


Question 80
===========================================================
You would like to compile and execute the following code. After the frame appears on the screen (assuming you get that far), you would like to resize the frame to be approximately twice its original width and approximately twice its original height. Which of the statements following the code is correct? (Choose one.)

 1. import java.awt.*;
 2.
 3. public class Q5 extends Frame {
 4.   Q5() {
 5.     setSize(300, 300);
 6.     setFont(new Font("SanSerif", Font.BOLD, 36));
 7.     Button b = new Button("Abracadabra");
 8.     add(b, BorderLayout.SOUTH);
 9.   }
10.
11.   public static void main(String args[]) {
12.     Q5 that = new Q5();
13.     that.setVisible(true);
14.   }
15. }

Only One: 
1) Compilation fails at line 8, because the frame has not been given a layout manager.
2) Before resizing, the button appears at the top of the frame and is as wide as the frame. After resizing, the button retains its original width and is still at the top of the frame.
3) Before resizing, the button appears at the bottom of the frame and is as wide as the frame. After resizing, the button retains its original width and is the same distance from the top of the frame as it was before resizing.
4) Before resizing, the button appears at the bottom of the frame and is as wide as the frame. After resizing, the button is as wide as the frame's new width and is still at the bottom of the frame.
5) Before resizing, the button appears at the bottom of the frame and is as wide as the frame. After resizing, the button retains its original width and is about twice as tall as it used to be. It is still at the bottom of the frame.


Question 81
===========================================================
The following code builds a GUI with a single button. Which one statement is true about the button's size?

 1. import java.awt.*;
 2.
 3. public class Q6 extends Frame {
 4.   Q6() {
 5.     setSize(500, 500);
 6.     setLayout(new FlowLayout());
 7.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂a在线| 精品亚洲免费视频| 国产主播一区二区三区| 国产成人精品免费网站| 男男gaygay亚洲| 美女任你摸久久| 成人免费福利片| 久久久久久久久一| 亚洲午夜久久久| 99在线精品免费| 2023国产精品| 国产精品一区二区在线观看网站| 99精品欧美一区二区蜜桃免费| 日韩精品一区二区三区四区视频| 一个色在线综合| 91蜜桃免费观看视频| 欧美一区二区私人影院日本| 国产精品免费视频一区| 精品一区二区三区影院在线午夜| 欧美亚洲国产一区二区三区va | 亚洲精品写真福利| 色综合一区二区| 亚洲裸体在线观看| 99久久免费视频.com| 国产色一区二区| 韩国在线一区二区| 国产精品国产馆在线真实露脸| 国产精品伊人色| 国产精品理伦片| 一本到一区二区三区| 国产偷国产偷精品高清尤物| 国产一区二区三区黄视频| 精品少妇一区二区三区视频免付费 | 亚洲精品成人天堂一二三| 色婷婷av一区二区三区大白胸| 一区二区三区在线高清| 色激情天天射综合网| 亚洲成人午夜影院| 精品美女在线观看| 国产一区二区视频在线| 久久精品人人爽人人爽| 97se亚洲国产综合在线| 一区二区三区四区在线| 日韩欧美一区二区久久婷婷| 成人自拍视频在线| 亚洲电影一区二区| 欧美韩日一区二区三区四区| 色偷偷久久一区二区三区| 极品销魂美女一区二区三区| 亚洲视频 欧洲视频| 日韩小视频在线观看专区| eeuss国产一区二区三区| 亚洲人成精品久久久久久| 精品日产卡一卡二卡麻豆| 国产精品亚洲成人| 国产美女视频91| 久久99久久精品欧美| 一区二区国产视频| 中文一区一区三区高中清不卡| 日韩视频123| jizzjizzjizz欧美| 亚洲国产视频网站| 亚洲另类春色国产| 国产亚洲精品aa| 欧美午夜片在线观看| 国产 欧美在线| 另类调教123区| ...xxx性欧美| 国产精品福利影院| 精品福利一二区| 欧美午夜精品电影| 日本韩国精品在线| 欧美日韩一区 二区 三区 久久精品| 精品一区二区三区视频| 精品一区二区av| 国产一区二区免费看| 岛国精品在线播放| 91传媒视频在线播放| 成人午夜又粗又硬又大| 国产成人av影院| 国产91高潮流白浆在线麻豆 | 欧美体内she精视频| 欧美一级日韩一级| 亚洲精品在线电影| 国产精品久久夜| 午夜av电影一区| 国产精品影视天天线| 99精品热视频| 5566中文字幕一区二区电影| 欧美一级在线观看| 国产精品情趣视频| 一级特黄大欧美久久久| 精品一区二区三区免费视频| av欧美精品.com| 日韩一区二区高清| 亚洲精选视频免费看| 久久99久久久久| 欧美人xxxx| 亚洲欧美福利一区二区| 毛片一区二区三区| 日本乱码高清不卡字幕| 欧美中文字幕一区二区三区亚洲| www久久精品| 亚洲成va人在线观看| 国产精品综合av一区二区国产馆| 国产成人啪午夜精品网站男同| 在线免费观看日本欧美| 国产日韩欧美在线一区| 精品一区二区综合| 欧美一区二区三区色| 日韩毛片精品高清免费| 国产精品2024| 欧美一卡二卡在线| 日韩不卡手机在线v区| 在线免费观看不卡av| 中文字幕欧美国产| 久久99久久99| 精品99999| 日本不卡高清视频| 欧美日韩国产另类不卡| 2欧美一区二区三区在线观看视频| 一区二区三区四区国产精品| 色播五月激情综合网| 最新成人av在线| 欧美图区在线视频| 丝袜美腿亚洲一区二区图片| 在线播放中文字幕一区| 午夜精品123| 精品对白一区国产伦| 国产成人在线视频播放| 国产女人18水真多18精品一级做| 精品中文av资源站在线观看| 欧美精品一区二区不卡 | 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 欧美高清在线一区二区| 99精品国产视频| 日韩高清不卡在线| 国产亚洲精品资源在线26u| 99re免费视频精品全部| 亚洲va国产天堂va久久en| 精品乱人伦一区二区三区| 国产.精品.日韩.另类.中文.在线.播放| 国产精品久久久久桃色tv| 欧美裸体bbwbbwbbw| 91精品久久久久久久91蜜桃| 国产1区2区3区精品美女| 亚洲女人的天堂| 欧美主播一区二区三区美女| 亚洲欧洲日韩综合一区二区| 欧美一级搡bbbb搡bbbb| 色综合久久久久综合体桃花网| 亚洲一区二区三区视频在线| 欧美国产日本韩| 日韩欧美国产小视频| av电影在线观看完整版一区二区| 日韩电影一区二区三区| 午夜精品国产更新| 亚洲综合激情另类小说区| 国产精品久久久久久久久果冻传媒| www久久精品| 亚洲欧洲制服丝袜| 亚洲免费伊人电影| 综合自拍亚洲综合图不卡区| 一区二区三区视频在线看| 亚洲免费三区一区二区| 综合电影一区二区三区 | 午夜视频在线观看一区| 亚洲成年人影院| 久久成人精品无人区| 亚洲一区欧美一区| 午夜欧美在线一二页| 另类调教123区| 色综合天天综合网天天看片| 成人免费观看av| av成人免费在线观看| 欧美日韩aaaaaa| 久久精品免视看| 一区二区不卡在线播放| 日韩高清不卡在线| 粗大黑人巨茎大战欧美成人| 成人黄色软件下载| 精品女同一区二区| 亚洲综合男人的天堂| 日韩精品国产欧美| 99久久99久久精品国产片果冻| 精品少妇一区二区三区| 中文字幕一区二区三区色视频| 亚洲日韩欧美一区二区在线| 香蕉乱码成人久久天堂爱免费| 丰满岳乱妇一区二区三区| 欧美日韩中字一区| 日韩精品国产欧美| 经典三级视频一区| 精品国产精品网麻豆系列| 亚洲综合成人在线视频| aaa亚洲精品| 国产精品久久久一本精品| 国产91精品在线观看| 精品国产乱码久久久久久牛牛 | 精品久久人人做人人爽|