Java Java Objects Harnessing the Power of Objects Changing State

Nkosinolwazi Moyo
Nkosinolwazi Moyo
9,578 Points

Private field

It says add a private field but have added. I do not know where I'm missing it

GoKart.java
class GoKart {
  public static final int MAX_BARS = 8;
private int barsCount;
  }

1 Answer

Luke Maslany
Luke Maslany
3,534 Points

I suspect that is a typo. The Task asks you to create the private variable named 'barCount'. Yours is named 'barsCount'.