When to use static import in Java with example

Tutorials Shared by the Internet Community

Advertisements


Synopsis

Static import in Java is a pretty useful feature, which allows to only import static members of a certain class e.g. static fields and static methods.

Statistics

  • Total Hits - 27306

  • Total Votes - 138 votes

  • Vote Up - 63 votes

  • Vote Down - 75 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Core JAVA

  • Submitted By - Javin Paul

  • Submitted on - 2013-05-10 16:09:30

Description

Static import in Java is a pretty useful feature, which allows to only import static members of a certain class e.g. static fields and static methods. By importing static members, we can use them like they are member of same class. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements