class Toyota { int modelelNumber; public Car() { this.modelNumber = 2011; } public void setModelNumber(int modelNumber) { this.modelNumber = modelNumber; } } class Car { public static void main(String []main) { Toyota newCar = new Toyota(); newCar.setModelNumber(2012); <--------------- 1 newCar.modelNumber = 2013; <-----------------2 } }
Car
Toyota
setModelNumber
ModelNumber
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)