• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static import

 
ajaysharma fbd
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do static-import feature also imports static inner classess???
 
Winston Gutkowski
Bartender
Pie
Posts: 10506
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ajaysharma fbd wrote:Do static-import feature also imports static inner classess???

I may be wrong, but I'm pretty sure that's why it was added. To be honest, I don't use them much, because I like to see the the outer class specified (more keystrokes for you, but a lot clearer for me ).

This is especially true when nested classes have generic names like 'Entry' or 'Builder'.

Winston
 
Stephan van Hulst
Bartender
Pie
Posts: 6114
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like to import enum constants. Here's an example of how you could set up a chess board:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic