I am studying about static variables. They say that static variables are class variables. They gave an example like this
class Bicycle{
private static int noOfBicycles = 0;
}
When calling this we can directly use the name of the class to call this variable without creating any object, i.e.
Bicycle.noOfBicycles
So when do we need these static variables rather than instance variables?