Consider the following code. 
Please list which lines below will not compile. (choose all that apply)
1. public class acd {
2.     public static void main(String arg[])
3.     {      
4.        Object obj1 =  new Object();      
5.        char c  =  3;      
6.         short     s  =  41;      
7.         byte b  =  41;      
8.         s    =   b*b;      
9.         Double       d   = new Double(4.12f);    
10.        Float     f = new Double(2.33);    
11.        d  =    obj1;    
12.        Float []ff =  new Float[5];     
13.       float f1 = ff[0];     
14.       obj1 = ff;     
15.      obj1 = ff[5];     
16.     }
17. }
Consider the source code of the following class 
UIDTest
1.class UIDTest
2.     {
3. long testing (float a, float b) {return 0;}
4.
5. }
Which one of the following methods would be legal, at line 4 in class UIDTest. (choose all that apply)
a. String testing (float a, float b){ return “acd”;}
b. long testing (float a, float b, int i ) { return 0;}
c. long testing (float a, float b ) throws Exception { return ‘0’;}
d. float testing (float a, int b ) { return 0.01;}
e. double testing (float a, int b, int c ) { return 1e10;}
True or False: In the code fragment below, line 4 is executed.
1. String s1 = “UID”
2. String s2 = “UID”
3. if(s1 == s2)
4. System.out.println(“ UID is printed”);
A. TrueB. False
Given a string constructed by calling s = new String(“Hung”), which of the call listed below modify the string? (choose all that apply)A. s. append(“xxx”);
B. s.trim();
C. s.substring(3)
D. s.replace(‘z’.’a’);E. s.concat(s);F. Non of the above
Which would be the most suitable for storing data elements that must not appear in the store more than once, if searching is not a priority?  
A. java.util.Collection
B. java.util.List
C. java.util.Set
D. java.util.Map
E. java.util.VectorF. java.util.HashSet
Which one of the following statements is true? (choose all that apply)
A. Transient methods may not be overridden.
B. Transient classes may not be serialized.
C. Transient variables must be static.
D. Transient variables are not serialized.
Consider the source code of the following source code, which is in UIDTest.java 
1. class Test
2. {
3. long result (float a, float b) {return 0;}
4. }
5. public class UIDTest extends Test
6. {
7.
8. }
Which of the following method would be legal (individual), at line 7.  (choose all that apply)
a. public long result (float a, float b) {return 0;}
b. public long result (float a, float b) throws Exception {return 0;}
c. public long result (float a, float b, int c) {return 0;}
d. public long result (float a, float b, int c) throw Exception {return 0;}
e. public String result2 (float a, float b) throw Exception {return "0";}
f. public  String  result2(float a, float b) {return "0"; }
Which of the following are true. (choose all that apply)      
a   String is not thread-safe     
b   StringBuffer should be used when localization is required     
c   String is immutable while StringBuffer is not.     
d  StringBuffer is the buffer for String.     
e   String and stringBuffer are identical.
What will the following program print when method print1 of B is executed?  (choose all that apply)
interface I{  
void foo();}
class B implements I{  
void print1()  {    print2(this);  }  
void print2(I i)  {    i.foo();  }  
void print2_this()  {    System.out.println("Surprise");  }  
public void foo()  {    System.out.println("Hello");  }}     
a   Hello    
b   Surprise    
c   the program will not compile    
d   “Hello”    
e   “Surprise”
How many threads can potentially access one servlet instance   
a    always only one    
b    multiple     
c    exactly two: one created by the JVM another by the servlet container   
d     zero   
e     wrong question.