Differentiate between static and nonstatic members in java 2011
Virtual Position Forum :: Members Lounge :: Sciences & Knowledge :: Programing and Design :: Java Forum
Page 1 of 1 • Share
Differentiate between static and nonstatic members in java 2011
Differentiate between static and nonstatic members.
sharmila farooqi- Monstars
- Posts : 35
Join date : 2011-05-29
Re: Differentiate between static and nonstatic members in java 2011
Static variables and methods are associated with the class itself and are not tied to any particular object. Therefore static's can be accessed without instantiating an object. Static methods and variables are generally accessed by class name.
The most important aspect of static's is that they occur as a single copy in the class regardless of the number of objects. Static's are shared by all objects of a class.
Non static methods and instance variables are not accessible inside a static method because no this reference is available inside a static method.
The most important aspect of static's is that they occur as a single copy in the class regardless of the number of objects. Static's are shared by all objects of a class.
Non static methods and instance variables are not accessible inside a static method because no this reference is available inside a static method.
Vuhelper- Deep Bench
- Posts : 97
Join date : 2011-05-29
Virtual Position Forum :: Members Lounge :: Sciences & Knowledge :: Programing and Design :: Java Forum
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Yesterday at 10:16 pm by ali001
» Amuse - Become Smarter
Wed May 15, 2024 10:50 am by ali001
» Fort Lock
Sat May 04, 2024 11:49 am by ali001
» house disrepair claims
Thu May 02, 2024 4:29 pm by Ibad Khan Buledi
» Bounce n Bang: Physics puzzler
Thu May 02, 2024 11:39 am by ali001
» AIChatSY - AIChatbot Assistant
Wed May 01, 2024 10:48 am by ali001
» Storybook Magic App
Tue Apr 30, 2024 7:06 pm by ali001
» Flower Book Match3 Puzzle Game
Tue Apr 30, 2024 12:17 pm by ali001
» Avian Influenza Symptom in Chickens "Bird Flu H5N1 Virus" Vet learning materials, Poultry Farming
Sat Apr 27, 2024 9:57 am by Ibad Khan Buledi