Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Tiger beta] static import

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic