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 is hashcode calculated in java?

494


why not override thread to make a runnable? : Java thread

549


What is meant by anonymous class?

583


Is null a string?

543


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

695






How is hashset defined in java?

514


What do you understand by the term polymorphism?

620


What is the statements?

582


What is difference between protected and private?

522


Can arraylist hold different types java?

477


Tell me the latest versions in java related areas?

574


What is a boolean flag in java?

559


What are static initalizers in java ?

570


Where is singleton pattern used?

520


Give us the name of the list layoutmanagers in java?

516