Static import with sefault package

M

Matteo

I'm converting to Java1.5. I've implemented static import with no
problem, with the exceptions of some statics in a class in the default
(unnamed) package. When I try to static import this it gives me a
"cannot find symbol" error on compilation.
Why?
How can I do?

Thank you,
Matteo
 
J

John C. Bollinger

Matteo said:
I'm converting to Java1.5. I've implemented static import with no
problem, with the exceptions of some statics in a class in the default
(unnamed) package. When I try to static import this it gives me a
"cannot find symbol" error on compilation.

I'm not surprised.

You can't generally import members of a default package since
How can I do?

Put your classes in a named package. This is good general advice in any
case.


John Bollinger
(e-mail address removed)
 
M

Matteo

John C. Bollinger said:
I'm not surprised.


You can't generally import members of a default package since


Put your classes in a named package. This is good general advice in any
case.

I'll put all in a named package,
Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top