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

    Questions no -1 
    What is the output for the below code ?
    
    public class Test {
    	
    	public static void main(String... args) throws Exception {
    		 File file = new File("test.txt");  
    		 System.out.println(file.exists());
    		 FileWriter fw = new FileWriter(file); 
    		 System.out.println(file.exists());
    	}
    	
    }
    
    
    
    options A)true true B)false false C)false true D)true false Correct answer is : C Explanations :Creating a new instance of the class File, you're not yet making an actual file, you're just creating a filename. So file.exists() return false. FileWriter fw = new FileWriter(file) do three things: It created a FileWriter reference variable fw. It created a FileWriter object, and assigned it to fw. It created an actual empty file out on the disk. So file.exists() return true.
    Questions no -2 
    When comparing java.io.BufferedWriter and java.io.FileWriter, which capability exist as a method in only one of two ?
    
    
    
    options A)closing the stream B)flushing the stream C)writting to the stream D)writting a line separator to the stream Correct answer is : D Explanations :A newLine() method is provided in BufferedWriter which is not in FileWriter.
    scjp 1.5 | scjp 1.6 | scwcd 1.5
    Java Certifications
    www.javacertifications.net