- When a class member includes a static modifier,the member is called as static member.When no static modifier is present the member is called non-static or instance member.
- Static members are invoked using class name where as instance members are invoked using instances(objects) of the class.
- An instance member belongs to specific instance(object) of a class.If we create three objects of a class we have three sets of instance members in the memory, where as there will ever be only one copy of the static member,no matter how many instances of a class are created.
Tuesday, March 7, 2017
Tell about static and instance class members?
Subscribe to:
Post Comments (Atom)
Call a function in child component from parent component in React
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
-
Common Language Runtime or CLR is the run-time execution environment of .Net Framework. Converting MS-IL into platform or OS specific code ...
-
The process of replacing a module with generic and mostly empty object, called a mock. Advantages: Isolates our code from its dependen...
-
An object is an entity that has Properties for identifying State, Methods for behavior, Events for depicting the change of State. Data ass...
No comments:
Post a Comment