wood burning stoves 2.0*
The moose likes Java in General and the fly likes [Tiger beta] static import Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "[Tiger beta] static import" Watch "[Tiger beta] static import" New topic
Author

[Tiger beta] static import

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Hi all,

Brett mentions in his Java Tiger Devloper Notes that using *both* static and normal import for the same class will make compiler gripe about a name conflict. I tried this



The compiler did not complain. Why?
[ December 04, 2004: Message edited by: Pradeep Bhat ]

Groovy
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
I tried a lot of variations and they all worked.

import affects class names and import static affects member names. Since class and member names occupy different name spaces, I don't see how a conflict could happen even if the names were identical.


Mike Gershman
SCJP 1.4, SCWCD in process
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Tiger beta] static import