Difference between static methods, static variables, and static classes in Java.



Difference between static methods, static variables, and static classes in Java...

Answer / nashiinformaticssolutions

A variable, method, or class can be made static by using the static keyword. A static class cannot be instantiated. When both objects or instances of a class share the same variables, this is referred to as static variables. Static methods are simply methods that refer to the class in which they are written.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is a class reference?

0 Answers  


State two differences between C and Java.

0 Answers   Syntel, Visa,


Can static methods access instance variables in java?

0 Answers  


What is procedure writing?

0 Answers  


Why parameters should be passed by reference?

0 Answers  






What is the difference between import java.util.date and java .util?

0 Answers  


what is difference between Interface and abstract class

2 Answers   GCPL,


What are the important methods of java exception class?

0 Answers  


What is string in java is it a data type?

0 Answers  


what should do when using multiple catch() block & what should never do for the same?

1 Answers  


List java api that supports threads?

1 Answers  


What is difference between static and abstract class?

0 Answers  


Categories