static vs instance : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

static vs instance
You can make your variables or methods either static or instance. If a variable is static, there is only one copy for the entire class, shared by all objects of that class. If a variable is instance (i.e not static) then there is one copy per object of that class. Unlike variables, code is never duplicated, whether the methods are instance or static. It is always shared by all objects of that class. static methods only have access to static variables and methods of the class. Instance methods have access to both static and instance variables and methods.

This page is posted
on the web at:

http://mindprod.com/jgloss/staticvsinstance.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\staticvsinstance.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.226.82.90]
You are visitor number