Witscale Test Center

SCJP Objectives Covered


SCJP Objectives Covered

Section 4: Language Fundamentals

 

4.1 Identify correctly constructed package declarations, import statements, class declarations (of all forms including inner classes) interface declarations, method declarations (including the main method that is used to start execution of a class), variable declarations, and identifiers.

 

4.2 Identify classes that correctly implement an interface where that interface is either java.lang.Runnable or a fully specified interface in the question.

 

4.3 State the correspondence between index values in the argument array passed to a main method and command line arguments.

 

4.5 State the effect of using a variable or array element of any kind when no explicit assignment has been made to it.

 

 

In chapter 1, we saw how to declare a simple Java class, its variables, and methods. The Java code comprising of all these declarations is stored in a text file called as the Java source file. You can compile this source file to get the class file(s)[§§§§§§§§]. However, for successful compilation you need to know about the structure of the source file. In this chapter, you will learn all about the Java source file and its structure.

You will write a special main() method in a Java class definition. Such class can be executed from command line after compilation. We will learn about the syntax and use of this main method. In addition to this, we will discuss other class fundamentals such as the automatic initialization of variables and proper implementation of a Java interface. Specifically this chapter covers the 4.1 (partial), 4.2, 4.3 and 4.5 (partial) sections of SCJP objectives.