Comments in Java

Comments can appear at anywhere in a class (i.e, before and after the package statement, before and within and after the import statements, before and after the class declaration, before and within and after the variables declaration or methods definition. In Java Programming Language there are three flavors of comments: Single line comments. Starts with //

The static import statement

By using the static import statement, the developer gain access to the constants and static methods of the imported class. It is possible to import an individual static member of a class or all its static members. The syntax is : import static package_name.ClassName.classMember; The * placeholder can also be used to access all static members

Package and import statements

In Java, the package statement is used to explicitly define the package in which the class resides. It groups related types1, providing access protection and namespace management. It must be the first executable line of code in a class or in an interface, and it must appears only once in a java file. To create

The structure of a Java class

The aim of this section is to cover the structure and components of a Java class and those of a Java source code file as well. I will try also to cover the similarities and the differences between them. The components of a Java source code file are: Comments; The package statement; The import statement(s);

OCA SE 7 Programmer I (1ZO-803), Topics

Here is a list of the officially declared topics for Oracle Java SE 7 Programmer I exam, published by Oracle Corporation on oracle site: Java Basic; Java Data Types; Using Operators; Using Decision Constructs; Creating and Using Arrays; Using Loop Constructs; Using Java Methods and Encapsulation; Working with Inheritance in Java; Java Exception Handling. Other related topics are