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 : Exception Mock Exam Practice Questions

    Questions no -1 
    What is the output for the below code ?
    
    public class SuperClass {
    	public int doIt(String str, Integer... data)throws ArrayIndexOutOfBoundsException{
    		String signature = "(String, Integer[])";
    		System.out.println(str + "  " + signature);
    		return 1;
    	}
    
    }
    
    
    public class SubClass extends SuperClass{
    
    	public int doIt(String str, Integer... data) throws Exception
    	{
    		String signature = "(String, Integer[])";
    		System.out.println("Overridden: " + str + " " + signature);
    		return 0;
    	}
    	
    	public static void main(String... args)
    	{
    		SuperClass sb = new SubClass();
    		try{
    			sb.doIt("hello", 3);
    		}catch(Exception e){
    			
    		}
    		
    	}
    	
    }
    
    
    options A)Overridden: hello (String, Integer[]) B)hello (String, Integer[]) C)This code throws an Exception at Runtime D)Compile with error Correct answer is : D Explanations : Exception Exception is not compatible with throws clause in SuperClass.doIt(String, Integer[]). The same exception or subclass of that exception is allowed.
    Questions no -2
    What is the result of executing the following code, using the parameters 0 and 3 ?
    
    public void divide(int a, int b) {
    	try {
    		int c = a / b;
    	} catch (Exception e) {
    		System.out.print("Exception ");
    	} finally {
    		System.out.println("Finally");
    }
    
    
    options A)Prints out: Exception Finally B)Prints out: Finally C)Prints out: Exception D)Compile with error Correct answer is : D Explanations : finally block always executed whether exception occurs or not. 0/3 = 0 Does not throws exception.
    Questions no -3
    Which of the below statement is true about Error?
    
    
    options A)An Error is a subclass of Throwable B)An Error is a subclass of Exception C)Error indicates serious problems that a reasonable application should not try to catch. D)An Error is a subclass of IOException Correct answer is : A and C Explanations : An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
    Questions no -4
    Which of the following is type of RuntimeException?
    
    
    
    
    options A)IOException B)ArrayIndexOutOfBoundsException C)Exception D)Error Correct answer is : B Explanations : Below is the tree. java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException java.lang.IndexOutOfBoundsException java.lang.ArrayIndexOutOfBoundsException
    scjp 1.5 | scjp 1.6 | scwcd 1.5
    Java Certifications
    www.javacertifications.net