import function
Syntax
import PKG_NAME[:SubpackageName[:SubpackageName]]{:ClassName | *}
Description
Before you can use a class name, you must first import it using an import declaration statement at the beginning of your program.
An import declaration statement names either all the classes in a package or a single application class.
Parameters
| Parameter | Description |
|---|---|
|
import PKG_NAME |
Specify the name of the package that you want to import. |
|
:SubpackageName[:SubpackageName] |
Specify the subpackage path to the class. |
|
ClassName |
Import only this class of the specified package. You won't have access to any other classes in the specified package, only this one. |
|
* |
Import all the classes of the specified package. |
Returns
None.
Example
The following gives you access to all the classes in the FRUIT package:
import FRUIT:*;
The following gives you access to the Banana class only in the FRUIT package:
import FRUIT:Banana;
The following gives you access to the Apple class only from the Fruit subpackage of the DRINKS package:
import DRINKS:Fruit:Apple;
Related Topics