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 skeleton and stub?

0 Answers  


How to transfer data from an Applet to Servlet ?

1 Answers  


How can you traverse a linked list in java?

0 Answers  


wht is customised exception?

1 Answers   Logica CMG, Novell, Prudential,


What is yield () in java?

0 Answers  


What is parsing in java?

0 Answers  


What is the purpose of sizeof operator?

0 Answers  


java Technical questions asked by JPMC

0 Answers   JPMorgan Chase,


Enlist few advantages of inheritance?

0 Answers  


what is object slice?

2 Answers   HTC, TCS,


What is a method in java?

0 Answers  


What is method reference in java?

0 Answers  


Categories