This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes import statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "import statement" Watch "import statement" New topic

import statement

chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 638

Hello all ,

Can we use static keyword with import statement.


Author @
Moody blogger who do not like to behave like target setting machines work.
Balaji Bang
Ranch Hand

Joined: Apr 23, 2007
Posts: 182

Yes Chetan ,We can use static with import. That becomes a static import ,
But the order will be
We use static imports to import static methods in a class.
Read 10th chapter in K&B book. You will understand more...
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14950

Here's an explanation of static import. This one of the new language features of Java 5.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: import statement
It's not a secret anymore!