What is static import?



What is static import?..

Answer / Divya Prakash Gupta

Static import allows you to use static methods or fields from a class without specifying the class name. It improves readability by avoiding repetition of the class name in every method call.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Which class is used by server applications to obtain a port and listen for client requests?

1 Answers  


explain what is transient variable in java?

1 Answers  


What is Difference between Serializable and Externalizable in Java serialization?

1 Answers   Cognizant, IBM,


Why does java have two ways to create child threads? Which way is better?

1 Answers  


Explain the difference between the public, private, final, protected, and default modifiers?

1 Answers  


What is java used for?

1 Answers  


What is a java applet? What is an interface?

1 Answers  


1.) if we use "private" in place of "public" in public static void main()... 2.) if we use "int" in place of "void".... 3.) can we ommit "static" keyword from that statement.... 4.) also can we give the command line arguments type as int type or float,etc.(.i.e (string args[]))

1 Answers  


Why doesn't the java library use a randomized version of quicksort?

1 Answers  


What are extraneous variables examples?

1 Answers  


what is the context

2 Answers  


What is the char data type?

1 Answers  


Categories