亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

310-025 scjp exam dumps 06/10/02

2019-11-18 11:46:03
字體:
來源:轉載
供稿:網友

  I PRepared by using "Complete java 2 Certification Study Guide" for Simon Roberts (Sybex).
  1. public class x implements Runnable{
  private int x;
  private int y;
  
  public static void main(String args[] ){
  x that = new x();
  (new Thread(that)).start();
  (new Thread(that)).start();
  }
  public synchronized void run(){
  for( ; ; ){
  x++;
  y++;
  System.out.Println("x=" + x + ", y=" +y);
  }
  }
  
  a. An error at line 11
  b. An error at line 7, 8
  c. The program prints pairs of values for x and y that might not always be the same on the same line (for example "x=2, y=1")
  d. The program prints pairs of values for x and y that are always the same on the same line (for example "x=1, y=1") in addition, each value appears twice (for example "x=1, y=1" followed by "x=1, y=1")
  e. The program prints pairs of values for x and y that are always the same on the same line (for example "x=1, y=1") in addition, each value appears only once (for example "x=1, y=1", followed by "x=2, y=2)
  
  Answer: E (my; C)
  
  2.
  1. public class x{
  2. public object m(){
  3. Object o=new Float(2.14F);
  4. Object [] oa=new Object[1];
  5. oa[0]=o;
  6. o=null;
  7. return o;
  8. } // end m() method.
  9. }
  
  When is the Float object creation in line 3 eligible for garbage collection ?
  
  a. just after line 5
  b. just after line 6
  c. just after line 7 (that is , as the method returns)
  d. just after line 8 (that is, as the method ends)
  
  Answer: I choose d which was wrong. I think ; b
  
  3.
  1. abstract class AbstractIt{
  2. abstract float getFloat();
  3. }
  4. public class AbstractTest extends AbstractIt{
  5. private float f1 = 1.0f;
  6. private float getFloat(){return f1}
  7. }
  
  what result?
  
  a. compile sUCcess
  b. An error at line 6
  c. An error at line 4
  d. An error at line 2
  
  Answer:
  b
  getFloat() in AbstractTest cannot override getFloat() in AbstractIt; attempting to assign weaker access privileges; was package
  
  
  4.
  import java.io.IOException;
  
  public class ExceptionTest{
  public static void main(String[] args){
  try{
  methodA();
  }catch(IOException io){
  System.out.println("caught IOException");
  }catch(Exception e){
  System.out.println("caught Exception");
  }
  }
  public void methodA(){
  throw new IOException();
  }
  }
  
  what result?
  
  a. The code will not compile
  b. Output is "caught Exception"
  c. Output is "caught IOException"
  d. The program execute nomally whihout print a message
  
  Answer:
  a
  non-static method methodA() cannot be refereced from a static context.
  
  
  5.
  public class Foo{
  public static void main(String[] args)[
  try{ return;}
  finally{ System.out.println("Finally");}
  ]
  }
  
  what result?
  
  a. Print nothing
  b. Print "Finally"
  c. Not compiled and will Exception thrown
  d. Not compile because catch block missing
  
  Answer:
  b
  
  
  6.
  public class Foo{
  public static void main(String[] args){
  StringBuffer a = new StringBuffer("A");
  StringBuffer b = new StringBuffer("B");
  Operate(a,b);
  System.out.println(a + "," + b);
  }
  static void operate(StringBuffer x,StringBuffer y){
  y.append(x);
  y = x;
  } // end operate
  }
  
  What print?
  
  a. "A,B" b. "A,A" c. "B,B"
  d. "AB,B" e. "AB,AB" f, "A,AB"
  
  Answer: F ans: A,BA
  
  
  7.
  1. class A implements Runnable {
  2. int I;
  3. public void run () {
  4. try {
  5. Thread.sleep(5000);
  6. i=10;
  7. }catch(InterruptedException e) {}
  8. }
  9. }
  10.
  11. public class Test {
  12. public static void main (String args[]) {
  13. try {
  14. A a = new A();
  15. Thread t = new Thread(a);
  16. t.start();
  17.
  18. int j= a.i;
  19.
  20. }catch (Exception e) {}
  21. }
  22. }
  
  Which statement at line 17 will ensure that j=10 at line 19
  
  A. a.wait(); B. t.wait(); C. t.join(); D. t.yield();
  E. t.notify(); F. a.notify(); G. t.interrupt();
  
  Answer: C
  
  8.
  1. public class SyncTest {
  2. private int x;
  3. private int y;
  4. private synchronized void set X (int i){ x=i; }
  5. private synchronized void set Y (int i){ y=i; }
  6. public void setXY (int i) {set X(i); set Y(i); }
  7. public synchronized boolean check() {return X != Y; }
  8. }
  
  Under which conditions will check() return when called from a different class. Choose one
  
  A. check() can never return true
  B. check() can return true when set XY is called by multiple threads
  C. check() can true when multiple threads call set X and set Y separately
  D. check() can only return true if synchTest is changed to allow x and y to be set separately
  
  Answer:
  I choose D
  
  
  9.
  Which is a method of the MouseMotionListener interface
  
  A. public void mouseDragged(MouseEvent)
  B. public boolean mouseDragged(MouseEvent)
  C. public void mouseDragged(MouseMotionEvent)
  D. public boolean mouseDragged(MouseMotionEvent)
  E. public boolean mouseDragged(MouseMotionEvent)
  
  Answer:
  A
  
  
  10.
  AnInterface is an interface.
  AnAdapter0 is an non-Abstract, not-final with zero argument construter
  AnAdapter1 is an non-Abstract, not-final without zero argument construter, but with a constructor to take one argument.
  
  Which will create Anonymous class (choose two)
  
  a}AnAdapter0 a = new AnAdapter0();
  b}AnAdapter1 a = new AnAdapter1();
  c}AnAdapter0 a = new AnAdapter0(5);
  d}AnAdapter1 a = new AnAdapter1(5);
  e}AnInterface a = new AnInterface(5);
  
  Ans:
  a and d are correct. B, c and e are wrong.
  
  11.
  What is true about java.util.Arraylist (choose one)
  
  a)The elements in the collection are ordered
  b)The collection is guaranteed to be immutable.
  c)The elements in the collection are guaranteed to be unique.
  d)The elements in the collection are accessed using a unique key
  e)The elements in the collection are guaranteed to be synchronized
  
  Answer:
  A is correct.
  ArrayList implemnets all optional List operation.
  b is wrong because lists typically allow duplicate elements. C is wrong this is Set facility. D is wrong because this is Map facility.
  E is wrong, Note that this implementation is not synchronized. If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally ( refer documents )
  
  12.
  1.class A{
  2. public int getNumber(int a){
  3. return a +1;
  4. }
  5.}
  6.class B extends A{
  7. public int getNumber(int a){
  8. return a + 2;
  9. }
  10. public static void main(String args[]){
  11. B b = new B();

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
欧美壮男野外gaytube| 日韩中文视频免费在线观看| 成人免费网站在线观看| 91久久综合亚洲鲁鲁五月天| 91免费的视频在线播放| 欧美插天视频在线播放| 欧美性69xxxx肥| 中文字幕久久久av一区| xvideos国产精品| 日韩美女激情视频| 中文国产成人精品久久一| 亚洲国产一区二区三区在线观看| 久久久最新网址| 中文字幕日韩在线视频| 欧美电影在线观看高清| 国产99久久精品一区二区 夜夜躁日日躁| yellow中文字幕久久| 欧美最顶级丰满的aⅴ艳星| 亚洲精品影视在线观看| 国产成人一区二区三区小说| 亚洲人永久免费| 国产视频精品一区二区三区| 欧美日韩免费在线| 国产精品精品一区二区三区午夜版| 亚洲女性裸体视频| 成人美女av在线直播| 精品中文字幕在线2019| 欧美日韩国产精品专区| 欧美另类99xxxxx| 亚洲日韩第一页| 777午夜精品福利在线观看| 中文字幕成人在线| 亚洲a一级视频| 欧美成人免费在线观看| 久久久久久亚洲精品中文字幕| 亚洲综合小说区| 一区二区亚洲精品国产| 91精品国产综合久久久久久蜜臀| 亚洲欧美日本另类| 色多多国产成人永久免费网站| 国产精品日韩在线一区| 亚洲欧美国产精品| 国产精品欧美日韩| 国产精品一区二区在线| 亚洲精品国产精品乱码不99按摩| 久久久精品国产网站| 国产精品情侣自拍| 欧美激情一级二级| 一区二区三区国产视频| 国产玖玖精品视频| 麻豆精品精华液| 最新国产成人av网站网址麻豆| 国语自产精品视频在线看抢先版图片| 91九色蝌蚪国产| 色噜噜狠狠色综合网图区| 成人免费视频xnxx.com| 亚洲精品国产欧美| 欧美高清自拍一区| 色噜噜亚洲精品中文字幕| 宅男66日本亚洲欧美视频| 国产精品欧美在线| 日韩中文字幕在线观看| 欧美激情久久久久久| 国内免费精品永久在线视频| 992tv在线成人免费观看| 亚洲专区中文字幕| 国产日本欧美一区二区三区| 日本国产精品视频| 久久91亚洲精品中文字幕| 欧美午夜美女看片| 91精品国产综合久久久久久久久| 亚洲男女自偷自拍图片另类| 国产成人精品视频在线| 538国产精品一区二区在线| 国外成人在线直播| 欧美激情精品久久久久久黑人| 欧美黄色小视频| 欧美黑人性视频| 亚洲人成网站在线播| 深夜福利国产精品| 欧美激情一级精品国产| 欧美裸体xxxx极品少妇软件| 91亚洲va在线va天堂va国| 亚洲国产日韩欧美综合久久| 成人乱人伦精品视频在线观看| 色999日韩欧美国产| 日韩中文视频免费在线观看| 国产在线观看不卡| 欧美电影免费观看| 欧美黄色片视频| 日本免费一区二区三区视频观看| 久久99青青精品免费观看| 91免费看片在线| 欧美精品免费在线| 精品久久久久久亚洲国产300| 欧美性猛交xxxx久久久| 国产精品中文在线| 欧美亚洲成人免费| 国产91在线视频| 最新国产精品亚洲| 欧美日本亚洲视频| 亚洲jizzjizz日本少妇| 欧美巨乳美女视频| 综合网中文字幕| 亚洲欧洲在线视频| 国产成人高潮免费观看精品| 欧美最猛性xxxx| 一本大道亚洲视频| 亚洲国产精品福利| 亚洲第一福利网| 欧美激情xxxx性bbbb| 国产成人在线一区| 国产成人一区三区| 欧美精品www在线观看| 欧美在线一区二区三区四| 最近2019年好看中文字幕视频| 亚洲999一在线观看www| 午夜精品三级视频福利| 久久久成人的性感天堂| 久国内精品在线| 精品动漫一区二区三区| 久久久久久久久久久免费精品| 亚洲精品久久久久中文字幕欢迎你| 亚洲男人天堂古典| 国产99在线|中文| 国产成人精品久久二区二区| 亚洲中国色老太| 成人写真视频福利网| 精品国产乱码久久久久酒店| 亚洲人成电影在线播放| 久久艹在线视频| 91精品国产99| 国产一区二区三区在线播放免费观看| 国产精品揄拍500视频| 一区二区欧美久久| www.xxxx精品| 亚洲无av在线中文字幕| 亚洲精品自拍第一页| 精品一区二区三区三区| 国产成人涩涩涩视频在线观看| 狠狠做深爱婷婷久久综合一区| 欧美丰满片xxx777| 欧美高清视频在线| 欧美高清视频在线| 狠狠躁夜夜躁人人爽天天天天97| 欧美日韩第一视频| 欧美大尺度在线观看| 欧美另类高清videos| 精品国产乱码久久久久久婷婷| 欧洲成人午夜免费大片| 中文字幕日韩av综合精品| 精品亚洲男同gayvideo网站| 国产一区二区三区在线视频| 亚洲精品电影网| 美日韩丰满少妇在线观看| 精品网站999www| 色综合久久中文字幕综合网小说| 夜夜嗨av色一区二区不卡| 欧美国产第一页| 国产做受高潮69| 欧美老女人bb| 久久这里有精品| 日韩成人在线视频| 国产丝袜一区二区|