Classes: Instance Variables


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

I just want someone to explain do we need to create new variables for every class that we create??

```

class Car {

//Using instance variables to model our Car class after a real-life car
int modelYear;

public Car() {

}

}

<do not remove the three backticks above>

#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.