What is the difference between static and non-static variables

Showing Answers 1 - 5 of 5 Answers

Patttukkottai Arun

  • Jul 21st, 2005
 

A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance.

  Was this answer useful?  Yes

Rajesh Sakhamuri

  • Nov 2nd, 2005
 

By Rajesh:static variables can be created only one copy,that copy can be shared with all the objects.static class can be access with static members only. non-static members can be access any members.it will depend upon the objects.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions