Showing posts with label Nested class. Show all posts
Showing posts with label Nested class. Show all posts

Saturday, 19 November 2011

Sun Certified Java Programmer (SCJP)

Language fundamentals


Package and class declarations


A package represents a group of classes. A package statement should be the first valid statement in the source file. If there is no package statement, the classes in the source file belong to the default unnamed package, or else they belong to the named package. Only one package statement is allowed in a source file.

In a source file, there can be only one public class, and the name of the file should match that of the class. An import statement allows