Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

static import java

static import
We can also import static members (methods and fields) of a class inside
another class. If we write an asterisk * in the import statement,we don't need 
to write the imported class name before invoking static methods or reading static fields.
example
import static java.lang.System.out;
import static java.util.Arrays.*; 
// instead of the statement "import java.util.Arrays;"
 
PREVIOUS NEXT
Tagged: #static #import #java
ADD COMMENT
Topic
Name
1+2 =