Java Certifications
www.javacertifications.com
 home  scjp1.5  scjp1.6  scwcd 1.5  scjp 1.5 questions  scjp 1.6 questions  scwcd 1.5 questions  scjp 1.5 success kit  scjp 1.6 success kit  
  JavaCertifications.net provides java certfication tutorials and mock questions.  


Bookmark and Share |||     Share   
805 scjp 1.6 questions with explanations ||| 788 scjp 1.5 questions with explanations ||| 650 SCWCD 5.0 questions with explanations

Mock Questions

  scjp 1.5

  • Declarations, Initialization & Scoping
  • Method overriding or overloading
  • Inner Classes
  • Flow Control
  • Type Safe Enum
  • Enhanced for loop
  • Assertions
  • Exception
  • API Contents autoboxing & unboxing
  • File
  • Serializable
  • java.text and Locale
  • Regular Expression
  • Collections and Generics
  • Thread and Concurrency

  •   scjp 1.6

  • Declarations, Initialization & Scoping
  • Method overriding or overloading
  • Inner Classes
  • Flow Control
  • Type Safe Enum
  • Enhanced for loop
  • Assertions
  • Exception
  • API Contents autoboxing & unboxing
  • File
  • Serializable
  • java.text and Locale
  • Regular Expression
  • Collections and Generics
  • Thread and Concurrency
  • NavigableMap
  • NavigableSet
  • java.io.Console

  •   scwcd 1.5

  • Servlet Basic
  • The Structure and Deployment of Web Applications
  • The Web Container Model
  • Servlet event listeners
  • Session Management,session listeners
  • Servlet Filter
  • Web Application Security
  • j2ee patterns
  • JSP Directives
  • JSP page life cycle
  • JSP implicit objects
  • JSP include
  • Expression Language (EL)
  • JSTL
  • Building a Custom Tag Library
  • SCJP : API Contents autoboxing & unboxing Mock Exam Practice Questions

    Questions no -1 
    What is the output for the below code ?
    
    public class Test {
    	
    
    	public static void main(String[] args) {
    		Boolean expr = true;
    		if (expr) {
    			System.out.println("true");
    		} else {
    			System.out.println("false");
    		}
    		
    	}
    
    
    }
    
    
    
    options A)true B)Compile Error - can't use Boolean object in if(). C)false D)Compile Properly but Runtime Exception. Correct answer is : A Explanations : In the if statement, condition can be Boolean object in jdk1.5 and jdk1.6. In the previous version only boolean is allowed.
    Questions no -2 
    What is the output for the below code ?
    
    public class Test {
    	
    
    	public static void main(String[] args) {
    		List list = new ArrayList(); 
    		list.add(0, 59);
    		int total = list.get(0);
    		System.out.println(total);
    
    		
    	}
    
    
    }
    
    
    
    options A)59 B)Compile time error, because you have to do int total = ((Integer)(list.get(0))).intValue(); C)Compile time error, because can't add primitive type in List. D)Compile Properly but Runtime Exception. Correct answer is : A Explanations :Manual conversion between primitive types (such as an int) and wrapper classes (such as Integer) is necessary when adding a primitive data type to a collection in jdk1.4 but The new autoboxing/unboxing feature eliminates this manual conversion in jdk 1.5 and jdk 1.6.
    Questions no -3 
    What is the output for the below code ?
    
    public class Test {
    	
    
    	public static void main(String[] args) {
    		Integer i = null;
    		int j = i;
    		System.out.println(j);
    		
    	}
    
    
    }
    
    
    options A)0 B)Compile with error C)null D)NullPointerException Correct answer is : D Explanations :An Integer expression can have a null value. If your program tries to autounbox null, it will throw a NullPointerException.
    scjp 1.5 | scjp 1.6 | scwcd 1.5
    Java Certifications
    www.javacertifications.net