SCJP Tutorials
The Sun Certified Java Programmer (SCJP) tutorials in this section provide IT professional interested in getting certified as SCJP. The SCJP certification process is a prerequisite to other Java-related software certification processes and is a valuable skill that any computer sciences professional should attain. The SCJP exam is an entry-level test, designed to secure that a developer has a working knowledge of the Java programming language.
SCJP tutorials encompass the basics of the Java programming language that will be examined in the SCJP certification process such as declarations, initialization, scoping, flow control, API contents, collections and generics. All of these areas of the SCJP tutorials provide thorough details and explanations of each including sample code to assist the programmer in learning about the Java language.
SCJP certification process includes a multiple-choice exam consisting of 72 questions that a potential certification holder will have to complete in a 175-minute time restraint. Using the tutorials as a study guide, the programmer or developer will be given tips, tricks and valuable information geared toward enabling the IT professional to pass the SCJP examination. Sun Microsystems, Inc. has created a test that focuses on writing code and examining a developer’s performance under pressure, rather than testing a series of memorized details.
Chapter 1. Declarations Initialization and Scoping Part-1 Develop code that declares classes including abstract and all forms of nested classes interfaces and enums and includes the appropriate use of package and import statements including static imports . In this tutorial you will learn about Declaration Class declaration Class modifiers...
Chapter 1. Declarations Initialization and Scoping Part-3 Develop code that declares initializes and uses primitives arrays enums and objects as static instance and local variables. Also use legal identifiers for variable names. Develop code that declares initializes and uses primitives arrays enums and objects as static...
Chapter 1. Declarations Initialization and Scoping Part-2 In this tutorial you will learn about Enum constructors Example of enum constructors Methods provided for the enum types Example of using enum type java.util.EnumSet Example of using java.util.EnumSet java.util.EnumMap Example of using EnumMap Creating and using packages and Static...
Chapter 1. Declarations Initialization and Scoping Part-4 Develop code that declares both static and non-static methods and - if appropriate - use method names that adhere to the JavaBeans naming standards. Also develop code that declares and uses a variable-length argument list. In this tutorial you will learn about Varargs Overloading resolution...
Chapter 1. Declarations Initialization and Scoping Part-5 Given a code example determine if a method is correctly overriding or overloading another method and identify legal return values including covariant returns for the method. Covariant return types You cannot have two methods in the same class with signatures that only differ by return...
SCJP 5 Chapter 1. Declarations Initialization and Scoping Part-6 Given a set of classes and superclasses develop constructors for one or more of the classes. Given a class declaration determine if a default constructor will be created and if so determine the behavior of that constructor. Given a nested or non-nested class listing write code...
SCJP 5 Chapter 2. Flow Control Part-1 Develop code that implements an if or switch statement; and identify legal argument types for these statements. The syntax of the switch statement is extended ever-so-slightly. The type of the Expression is now permitted to be an enum class. Note that java.util.Enum is not an enum class. A new production...
SCJP 5 Chapter 2. Flow Control Part-2 Develop code that implements all forms of loops and iterators including the use of for the enhanced for loop for-each do while labels break and continue; and explain the values taken by loop counter variables during and after loop execution. An enhanced for" loop The current for statement...
SCJP 5 Chapter 2. Flow Control Part-3 Develop code that makes use of assertions and distinguish appropriate from inappropriate uses of assertions. Two forms of the assert statement 1. Usual form An assert statement has two parts separated by a colon. The boolean condition must be true for execution to continue. If it is false an AssertionError...
SCJP 5 Chapter 2. Flow Control Part-4 Recognize the effect of an exception arising at a specified point in a code fragment. Note that the exception may be a runtime exception a checked exception or an error. Error An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most...
SCJP 5 Chapter 2. Flow Control Part-5 Recognize situations that will result in any of the following being thrown ArrayIndexOutOfBoundsException ClassCastException IllegalArgumentException IllegalStateException NullPointerException NumberFormatException AssertionError ExceptionInInitializerError StackOverflowError or NoClassDefFoundError....
SCJP 5 Chapter 3. API Contents Part-1 Develop code that uses the primitive wrapper classes such as Boolean Character Double Integer etc. and or autoboxing unboxing. Discuss the differences between the String StringBuilder and StringBuffer classes. Autoboxing unboxing of primitive types Manual conversion between primitive types...
SCJP 5 Chapter 3. API Contents Part-2 Given a scenario involving navigating file systems reading from files or writing to files develop the correct solution using the following classes sometimes in combination from java.io BufferedReader BufferedWriter File FileReader FileWriter and PrintWriter. File Files and directories are accessed...
SCJP 5 Chapter 3. API Contents Part-3 Develop code that serializes and or de-serializes objects using the following APIs from java.io DataInputStream DataOutputStream FileInputStream FileOutputStream ObjectInputStream ObjectOutputStream and Serializable. DataInputStream A data input stream lets an application read primitive Java data...
SCJP 5 Chapter 3. API Contents Part-4 Use standard J2SE APIs in the java.text package to correctly format or parse dates numbers and currency values for a specific locale; and given a scenario determine the appropriate methods to use if you want to use the default locale or a specific locale. Describe the purpose and use of the java.util.Locale...
SCJP 5 Chapter 3. API Contents Part-5 Write code that uses standard J2SE APIs in the java.util and java.util.regex packages to format or parse strings or streams. For strings write code that uses the Pattern and Matcher classes and the String.split ... method. Recognize and use regular expression patterns for matching limited to . dot...
SCJP 5 Chapter 6. Collections Generics Part 1 Given a design scenario determine which collection classes and or interfaces should be used to properly implement that design including the use of the Comparable interface. Summary of collections interfaces Collection - This is a basic set of methods for working with data structures. A...
SCJP 5 Chapter 6. Collections Generics Part 2 Write code that uses the generic versions of the Collections API in particular the Set< E List< E Queue< E and Map K V interfaces and implementation classes. Recognize the limitations of the non-generic Collections API and how to refactor code to use the generic...
SCJP 5 Chapter 6. Collections Generics Part 3 Develop code that makes proper use of type parameters in class interface declarations instance variables method arguments and return types; and write generic methods or methods that make use of wildcard types and understand the similarities and differences between these two approaches. Parameters...
SCJP 5 Chapter 6. Collections Generics Part 4 Use capabilities in the java.util package to write code to manipulate a list by sorting performing a binary search or converting the list to an array. Use capabilities in the java.util package to write code to manipulate an array by sorting performing a binary search or converting the array to...