Answer Posted / qamrun nisa
The static import construct allows unqualified access to
static members without inheriting from the type containing
the static members. Instead, the program imports the
members, either individually:
import static java.lang.Math.PI;
or en masse:
import static java.lang.Math.*;
Once the static members have been imported, they may be used
without qualification:
double r = cos(PI * theta);
The static import declaration is analogous to the normal
import declaration. Where the normal import declaration
imports classes from packages, allowing them to be used
without package qualification, the static import declaration
imports static members from classes, allowing them to be
used without class qualification.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Is java platform independent?
What is classes in java?
What is reverse function?
What's the base class of all exception classes?
How to provide security in java
What restrictions are placed on method overriding?
What is a pattern what is an anti pattern?
Can we force garbage collector to run ?
What is compareto () in java?
Explain about member inner classes?
explain the difference between jdk and jvm?
What is pangram in java?
What is protected access modifier?
What about main() method in java ?
What is main function purpose?