What is difference between static method and static
variable?

Answer Posted / archana

if we declare a variable as static then it has only one copy
for all classes. if a method is declared as static without
using object we can call it.

Is This Answer Correct ?    11 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you clear a list in java?

833


Explain wait(), notify() and notifyall() methods of object class ?

833


What are the 8 primitive data types in java?

785


How do you sort a string in java?

747


What is use of arraylist in java?

854


What does opcode mean?

789


What is use of functional interface in java 8? Explain

790


Explain reverse a linked list iterative solution in java?

727


What is the reason behind using constructors and destructors?

813


What is nan inf?

709


How does split work in java?

775


What is main difference between variable and constant?

796


What does it mean that strings are immutable?

897


What is java literals?

801


What is the vector class in java programming?

790