网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

Given an ActionEvent, which method allows you to identify the affected Component?()  

  • A、 Public class getClass()
  • B、 Public Object getSource()
  • C、 Public Component getSource()
  • D、 Public Component getTarget()
  • E、 Public Component getComponent()
  • F、 Public Component getTargetComponent()

参考答案

更多 “Given an ActionEvent, which method allows you to identify the affected Component?()  A、 Public class getClass()B、 Public Object getSource()C、 Public Component getSource()D、 Public Component getTarget()E、 Public Component getComponent()F、 Public Component getTargetComponent()” 相关考题
考题 Given that a scoped attribute cart exists only in a user’s session, which two,taken independently,ensurethe scoped attribute cart no longer exists?()A、${cart = null}B、c:remove var="cart" /C、c:remove var="${cart}" /D、c:remove var="cart" scope="session" /E、c:remove scope="session"cart/c:remove

考题 11. public enum Title {  12. MR(”Mr.”), MRS(”Mrs.”), MS(”Ms.”);  13. private final String title;  14. private Title(String t) { title = t; }  15. public String format(String last, String first) {  16. return title + “ “ + first + “ “ + last;  17. }  18. }  19. public static void main(String[] args) {  20. System.out.println(Title.MR.format(”Doe”, “John”));  21. }  What is the result?() A、 Mr. John DoeB、 An exception is thrown at runtime.C、 Compilation fails because of an error in line 12.D、 Compilation fails because of an error in line 15.E、 Compilation fails because of an error in line 20.

考题 抽象方法可以包含在任何类中()  A、接口中只能包含抽象方法和常量B、一个类可以实现多个接口C、接口不能被继承D、类实现接口时必须实现其中的方法

考题 public class Demo{  public static void main(String[] args){   List al = new ArrayList();  al.add(“1”);         al.add(“2”);  al.add(“2”);         al.add(“3”);  System.out.println(al);    } }  上述程序执行后的输出是哪项?()  A、 [1,2,3]B、 [1,2,2,3]C、 [1,2,3,3]D、 [2,1,3,2]

考题 下列有关类、对象和实例的叙述,正确的是哪一项?() A、类就是对象,对象就是类,实例是对象的另一个名称,三者没有差别B、对象是类的抽象,类是对象的具体化,实例是对象的另一个名称C、类是对象的抽象,对象是类的具体化,实例是类的另一个名称D、类是对象的抽象,对象是类的具体化,实例是对象的另一个名称

考题 public class SyncTest{   public static void main(String args) {    final StringBuffer s1= new StringBuffer();    final StringBuffer s2= new StringBuffer();    new Thread () {    public void run() {   synchronized(s1) {   s2.append(“A”);   synchronized(s2) {    s2.append(“B”);    System.out.print(s1);    System.out.print(s2);   }   }    }    }.start();   new Thread() {   public void run() {   synchronized(s2) {  s2.append(“C”);  synchronized(s1) {   s1.append(“D”);  System.out.print(s2);  System.out.print(s1);   }   }    }   }.start();   }   }   Which two statements are true? ()A、 The program prints “ABBCAD”B、 The program prints “CDDACB”C、 The program prints “ADCBADBC”D、 The output is a non-deterministic point because of a possible deadlock condition.E、 The output is dependent on the threading model of the system the program is running on.

考题 public class X {  public static void main(String [] args) {  try {  badMethod();  System.out.print(“A”);  }  catch (RuntimeException ex) {  System.out.print(“B”);  }  catch (Exception ex1) {  System.out.print(“C”);  }   finally {  System.out.print(“D”);  }  System.out.print(“E”);  }  public static void badMethod() {  throw new RuntimeException();  }  }  What is the result?()  A、 BDB、 BCDC、 BDED、 BCDEE、 ABCDEF、 Compilation fails.

考题 现有:  class Birds {  public static void main (String  []  args)  {   try {  throw new Exception () ;    } catch (Exception e) {   try {   throw new Exception () ;  }  catch  (Exception e2)  {  System.out.print ("inner           "); }   System. out.print ( "middle" ) ;    }  System.out.print ("outer") ;    }    }  结果是()A、 inner outerB、 middle outerC、 inner middle outerD、.编译失败

考题 class Order implements Runnable {    public void run ()  {  try { Thread.sleep (2000) ;  } catch (Exception e)    System.out.print("in") ;  public static void main (String [] args)  {    Thread t = new Thread (new Order ()) ;    t.start () ;  System.out.print ("pre ") ;  try { t.join () ;  } catch (Exception e)  { }    System.out.print ("post") ;   可产生哪两项结果?()  A、 pre in postB、 pre inC、 in post preD、 in pre postE、 pre post in