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
Similar topics
» DML Statements in java 2011
» what are classes in java 2011 ?
» How to set path in Java 2011
» Association in java 2011
» paintComponent in java 2011
» what are classes in java 2011 ?
» How to set path in Java 2011
» Association in java 2011
» paintComponent in java 2011
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
Today at 2:01 pm by ali001
» Goorevi App
Thu Nov 21, 2024 6:50 pm by ali001
» AMERICA EARNS! - Gift Card App
Mon Nov 18, 2024 11:07 am by ali001
» Kanba - Manage your Tasks
Thu Nov 14, 2024 12:21 pm by ali001
» Hemangiom'App
Tue Nov 05, 2024 11:25 am by ali001
» MindfulMe - Mental Health App
Mon Nov 04, 2024 10:50 am by ali001
» Learn Candlestick Patterns
Tue Oct 15, 2024 5:51 am by ali001
» Woh Pagal Si Episode 52 to 62 - Top Pakistani Drama
Sat Sep 21, 2024 6:26 pm by Mir Emmad Ali Khan Domki
» Nearu - share your socials
Sat Sep 21, 2024 1:12 pm by ali001