Generally, what is the difference between static and non static? Specifically, what is the difference between static methods and non-static methods?
Static.. permanent .. not static.. is not set in stone.. as applied to what exactly?
Static=fixed(that never changes) example=person Name,Date of birth Non-Static= not fixed example=Age,Address etc.
non static must be instantiated first MyClass mc = new MyClass(); now you can use MyClass(). static doesn't require instantiating the object first. But keep in mind a static method can't access instance methods or variables of the class. MyClass.DoWork(); where do work is a static method found inside MyClass().
Static is shared across classes, you dont have to create instances for each class
@akhaliq You can have private static methods too.
true
Join our real-time social learning platform and learn together with your friends!