I keep getting this error at the last curly bracket.
I am trying to set a mutator method to change the price of the car if the car has not been sold yet. if it has been sold it prints a error message.
// method to change the price of the car.
public String setPrice (int newPrice)
if (sold = false)
price = newPrice;
System.out.println(“Cannot set a new price as this car is sold”);