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
What is flag in python?
Explain the difference between string, stringbuffer and stringbuilder in java?
What is the latest java version?
How can u increase the heap size in the memory?
Why collection doesn’t extend cloneable and serializable interfaces?
How many types of variables are there?
Explain the private field modifier?
What is the use of arrays tostring () in java?
What are 3 boolean operators?
Which is a valid identifier?
Why java is not 100% object-oriented?
How do you allocate memory to object?
What is application tier?
What is floor math?
What are dot operator queries?