What is the use of static import ?

Answer Posted / bijoy baby

if we use static import we can access static methods and
static objects without the reference of class name. But one
disadvantage is u cant know the method or object is from
which class.

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

545


What is java oops?

561


Can arraylist contain null values?

570


Difference between method overloading and method overriding in java ?

578


What does localhost mean?

502






What is the benefit of abstract class?

517


What is meant by object oriented programming – oop?

548


Difference between stack and queue?

595


Define nashorn in java8.

570


Explain treeset?

595


Does hashset allow duplicates in java?

587


What is the use of math abs in java?

554


How to sort a collection of custom Objects in Java?

604


Can a private method be declared as static?

583


How do I stop concurrentmodificationexception?

513