Top Categories
The static import feature of Java 5 facilitate the java programmer to access any static member of a class directly. There is no need to qualify it by the class name. For accessing static members of a class we need to give references with the class they came from. In order to avoid unnecessary use
The static import feature of Java 5 facilitate the java programmer to access any static member of a class directly. There is no need to qualify it by the class name. For accessing static members of a class we need to give references with the class they came from. In order to avoid unnecessary use of static class members like System we can use static import. Static import allows you to use all the java classes that belong the imported package in the without the package reference. It allows to import static members of class and use them, as they are declared in the same class.