Check these practice exams. Be careful that many java rules may have changed over the time. Check that which jdk version or the exam these practice exams support http://www.jchq.net/mockexams/exam2.htm 20 practice exams Java Ranch JavaRanch Self Tester Marcus Green’s Mock Exam 1 Marcus Green’s Mock Exam 2 Marcus Green’s Mock Exam 3 Sun’s SCJP2 Site …
Category: Professional
Jul 16
SCJP: Basic Java I/O #Java Short Notes #SCJP
ByteStream is the basic I/O stream. Handles data as a stream of bytes. Does operation with byte unit and uses 8 bit. FileInputStream, FileOutputStream – can be used to copy files as byte by byte. Character Streams: FileReader and FileWriter are character streams. They treat file data as 16 bit unicode charater streams. InputStreamReader, OutputStreamWriter …
Jul 16
SCJP: Java Concurrency #Java Short Notes #SCJP
Java High Level Concurrency Objects constructors cannot be synchronized Liveness of multi-threaded applications Immutable Objects An application may have one or more processes. A process may have one or more threads. Two ways to create threads Thread.sleep(4000); To pause a thread. The time like 4000 ms is really dependent on the os and not precise …
Jul 16
SCJP: Random Stuffs #Java Short Notes #SCJP
An enum may NOT be declared in a method An enum can be imported If the JVM has a choice, it will select a method without varargs before selecting a method with varargs When enums are equal, both .equals and == always return true The headMap() method returns the portion of the map whose keys …
Jul 16
Java : SCJP: Important Resources #Java Short Notes #SCJP
How to use generics to avoid runtime errors. More Generics Class casting in Java: How to avoid runtime exception – ClassCastException: overloading, overriding, variable and method hiding Java HotSpot virtual machine What Java Technology can do? Offers from Java Technology Java:Common Problems (and Their Solutions) Benefits of OOP: Modularity, Information-hiding, Code re-use, Pluggability and debugging …
Jul 16
SCJP: Class Declarations #Java Short Notes #SCJP
class declarations Start with modifiers such as public, private followed by class keyword The class name, with the initial letter capitalized The name of the class’s parent (superclass), preceded by the keyword extends (if any). A class can only extend (subclass) one parent. list of interfaces implemented by the class, preceded by the keyword implements …
Jul 16
SCJP: Interfaces #Java Short Notes #SCJP
Interface An interface is a reference type, similar to a class Interfaces can contain only constants, method signatures, and nested types No method is implemented Interfaces cannot be instantiated They can only be implemented by classes or extended by other interfaces Interfaces are not part of the class hierarchy A class can implement multiple interfaces …
Jul 16
SCJP: Flow controls and exception #Java Short Notes #SCJP
Flow Control and ExceptionsFlow control statements Conditional: if, if-else and switch-case Looping: for, while, do-while Exception handling: try-catch-finally, throw Ad hoc flow control: break, continue with or without labels switch statement switch(expression){ case ConstantExpression: statement(s); case ConstantExpression: statement(s); . . . default: statement(s); } expression: must be char, byte, short, or int, or a compile-time …
Jul 15
SCJP: Classpath and Jar #Java Short Notes #SCJP #Blog
Java certification exams like SCJP test your knowledge about java classpath. Check here for an excellent resource on the topic . System classpath We can specify classpath in the command line or make use of a `system’ class path. The IDEs have their own way of maintaining class paths. System class paths will be used …
Jul 15
SCJP: Java Operators #Java Short Notes #SCJP
Exams like SCJP test your understanding of Java operators and how to use them like: assignment operators: =, +=, -=arithmetic operators: +, -, *, /, %, ++, —relational operators: < , , >=, ==, !=logical operators: &, |, ^, !, &&, ||conditional operators: ? : Also operators to check the equality of two objects or …