1public class Bicycle {
2...
3 public static int instances = 0;
4
5 {
6 ++instances; //separate counting from constructor
7 }
8...
9 public Bicycle(int gear, int speed, int seatHeight, String color) {
10 gear = 0;
11 speed = 0;
12 seatHeight = 0;
13 color ="Unknown";
14 }
15}