In my previous article, we have already discussed about difference between both static and non static members. Today we will learn example of both. Static member are not accessible by instance of the class. Look
In above snap, you can see that compile time error has been occurred, because static member are not accessible by the instance of the class. Static member are only accessible by the class name. Look
In above snap, you can see that compile time error has been occurred, because static member are not accessible by the instance of the class. Static member are only accessible by the class name. Look
so common variables are composed static members. While, we need object for calling non-static members.