0
i dont understand Whats is static. anyone can explain it pls. ando give me an example.
5 Answers
+ 2
Static means that you can't make a copy of that... By making static you don't need any instance to make it call.. You just refer it to the main class.. It will automatically called..
0
http://stackoverflow.com/questions/413898/what-does-the-static-keyword-do-in-a-class
this explanation is incredibly good.
In a nutshell, static means it belongs to the class.
0
thanks
0
Static function means that you do not need to create an object to call that function.
just use ClassName.functionName();
and it'll run.
0
Static members are class members and hence they cannot be instantiated. Note that a static member cannot access non static members.