October 12, 2016
In the previous posts, we have learnt how to create a class and variables and functions within. But there are times, that a variable or function should belong to the whole class type, not just one object instance. For example, we might be interested on how many dogs we have made in our current environment. That count of all the dogs should be belonged to the dog class, not just one dog. We can utilise static modifier in this case.