Names
What is the difference between an identifier and a name? An identifier is just a sequence of letters and digits that don't match a keyword or the literals “true,” “false,” or “null.” A name, on the other hand, can be prefixed with any number of further identifiers to pin-point the namespace from which it comes. An identifier is thus the simplest form of name. The general case of name looks like the following:
package1.Package2.PackageN.Class1.NestedClass2.NestedClassM.memberN
Since packages can be nested in packages, and classes nested in classes, there can be an arbitrary number of identifiers separated by periods, as in:
java.lang.System.out.println( "goober" );
That name refers to the java.lang package. There are several packages ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access