InterviewSolution
| 1. |
What is static modifier and its example |
|
Answer» AS the name suggest static Static modifier are used to declare a static member and belongs to type itself rather than to specific object. We can use static modifier with fields, operators, properties, events, constructors and METHODS but we cannot used with indexers, destructors, or types.Once we declare static varible it will automatically initialized in memory by there default value or value defined by user once we will initialized static VARIABLE it will never reinitialized in memory on other hand local variables local variable reinitialized in memory every time they call as well as all the objects of the CLASS SHARE the same address of static variable. |
|