dcsimg
Have a question related to java packages.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Siddharth_Shah
Posted On:   Thursday, January 25, 2007 05:34 AM

I want to create a package with two java files and both
files are having public class. Now how i can use first

class in second class to create object of first class.

Re: Have a question related to java packages.

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, January 25, 2007 06:03 AM

Just instantiate it the normal way. If you start using classes from other packages, you need to import the classes using

import my.package.name.MyClass


or if you have multiple classes of one package:

import my.package.name.*
About | Sitemap | Contact