Got stuck here


class Coffee {

public Coffee() {


public void addSugar(int cubes) {

	System.out.println("You added " + cubes + " sugar cubes.");


public static void main(String[] args) {
Coffee myOrder = Coffee(3);



Error message is under error: cannot find symbol
Coffee myOrder = Coffee(3);
symbol: method Coffee(int)
location: class Coffee
1 error


The code all looks fine until you get to this line:

The aim here is to create the coffee class, create a new instance of the class (myOrder) and then call the method addSugar. The main issue with the line above is that you're passing 3 into coffee, and not into the method.

To create the new instance we would need to create a new instance and then call the addSugar method

Coffee myOrder = new Coffee();