USING SYSTEM PACKAGES
The syntax of defining a package is –
import package name.classname;
or
import packagename.*;
This shows that the package name java contents the package awt which turn contents various classes require for implementing graphical user interface. There are two ways of accessing the classes stored in a package. The first approached to the fully qualified class name of the class that we want to use. Here we want to refer the class color in the awt package then we do as follows---
Java.awt.colour
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment