+ 1
When should I use static?!
5 Answers
+ 2
thanks
+ 1
Usung static makes it belong to the class not each object individually. Image you were creating a blueprint of a house the blueprint might contain a width and hight. These would apply to each house built. A static member is more like properties belonging to the paper the blueprint is written on. No matter how many house you build the original blueprint will always have the same properties.
Static should be used when you want one property or method that is shared across everything created with that class blueprint.
0
what is an instance?!