What is the difference between static and non-static
variables?

Answer Posted / pravallika

in case of static variables memory can be allocated only at once and these variables can access with help of class name but where as non static variables have memory can be allocated in separate locations.And these variables can access with help of object

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about sets?

768


What is a programming object?

778


How many inner classes can a class have?

809


What do you mean by a JVM?

826


Tell me a few examples of final classes defined in Java API?

780


What is set in java?

770


Which software is used for java programming?

775


Say any two properties in beans?

807


How can you handle java exceptions?

731


What is variable in java?

727


How do you use nextline in java?

706


when to use ArrayList and when to use HashMap in webApplication.

4243


why using interface interface ?

1768


Why do we use return statement?

765


What is yield () in java?

673