I have one question about static and non-static function and variable.
1) non-static function access static variable.
It\'s OK!
class Bar
{
publ
Static means this is independent of a particular instance of the class. Static methods don't have access to the this
pointer. That is the reason you need to call them using the class name.
When you call the Static method, you might not even have any instance of the class defined.
non-static means implies an instance, and could be different with different instances.
So, basically, it does not make sense to access non-static members from static methods.