mypackage.HelloWorld helloworld = new mypackage.HelloWorld();
import" keyword: For example,
|import world.*; // we can call any public classes inside the mypackage package|
Lets see an example importing the created package into the another program file.
In this program the package "importpackage"
is created under the "c:\nisha" directory that will be imported into another program file to call the function
of the class "HelloWorld".
Now make a program file named "CallPackage" under the "c:\nisha" directory importing the package "importpackage".
Out of the program:
This is the function of the class HelloWorld!!
Make sure to the directory structure for this program shown as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: March 10, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles