This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes static import Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "static import" Watch "static import" New topic
Author

static import

ajaysharma fbd
Greenhorn

Joined: Aug 06, 2012
Posts: 2
Do static-import feature also imports static inner classess???
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7484
    
  18

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


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3573
    
  14

I like to import enum constants. Here's an example of how you could set up a chess board:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static import
 
Similar Threads
static imports
IMPORTS Doubt
static import
import
Static Imports