how to import the class that is present in default package [message #324002] |
Wed, 16 January 2008 06:23 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
I have created a class("xyz.java") in default package and i have made one more package(hello.abc) and created a class inside that package(new.java) i want to import the class that is in the default package in new.java how can i do that.is it possible or i have to create a package and put that file(xyz.java) to package
|
|
|
Re: how to import the class that is present in default package [message #324011 is a reply to message #324002] |
Wed, 16 January 2008 11:42 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
It is not possible to import things from the default package. Don't use
the default package. It's a useless thing.
gudsy wrote:
> I have created a class("xyz.java") in default package and i have made one more package(hello.abc) and created a class inside that package(new.java) i want to import the class that is in the default package in new.java how can i do that.is it possible or i have to create a package and put that file(xyz.java) to package
>
|
|
|
|
Re: how to import the class that is present in default package [message #324015 is a reply to message #324011] |
Wed, 16 January 2008 15:11 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Well it's not useless, just very limited :-) .
If you are doing a "one-off I just need to run this little thing right
now and I'm not talking to anybody else and they aren't talking to me
and I'm not putting it into a jar to run later in a fancy application"
then the default package is OK. Notice all of the qualifiers in the
above statement. :-)
Ed Merks wrote:
> It is not possible to import things from the default package. Don't use
> the default package. It's a useless thing.
>>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.03579 seconds