Tag: web technology

Questions Related to web technology

What is the output for the below code ? class A implements Runnable{ public void run(){ System.out.println(Thread.currentThread().getName()); } } public class Test { public static void main(String... args) { A a = new A(); Thread t = new Thread(a); t.setName("good"); t.start(); } }

  1. good

  2. Compilation succeed but Runtime Exception

  3. null

  4. Compilation fails with an error at line 5


Correct Option: A
  1. Compile Properly but Runtime Exception

  2. Compile time error, because you have to do int total = ((Integer)(list.get(0))).intValue();

  3. 59

  4. Compile time error, because can't add primitive type in List.


Correct Option: C
  1. Simple Object Access Protocol

  2. Simplified Object Access Protocol

  3. Simplified Object Access Program

  4. Simple Or Advanced Protocol


Correct Option: A
  1. dependent

  2. sometimes dependent

  3. independent

  4. sometimes independent


Correct Option: C
  1. December 1998

  2. December 2001

  3. November 1998

  4. November 2001


Correct Option: D