public class Bicycle {
private int cadence;
private int gear;
private int speed;
private int id;
private static int numberOfBicycles = 0;
p
Non static methods can access static members of a class because only a single copy of the static variable exists unlike instance variables which are only created once a new object of that type has been created.
I recommend you have another class to test,like BicycleTest which will have the main class and then create maybe 4Bicycle objects and using 2getters in the Bicycle class retrieve the numberofBicycles and ID everytime you create an object maybe that will give you a picture of what is happening.