The package name is a series of elements separated by periods. : package « Java Source And Data Type « SCJP






The package statement must be the first non-comment line in a source file.


package com.yourcompanyname.application;

public class MainClass{
   private int iValue;
}








1.3.package
1.3.1.The package name is a series of elements separated by periods.
1.3.2.Packages are identified by the package statement.
1.3.3.Use only alphanumeric characters in package names.
1.3.4.java.lang package is imported by default and does not need to be imported by an import statement.
1.3.5.Other than java.lang, every other package you use must be named in an import statement