Why i cant create the object? what im doin wrong?


#1

class Coffee {

public Coffee() {
int Coffee;

}

public void addSugar(int cubes) {

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

}

public static void main(String[] args) {

Coffee MyOrder = new Coffee();

}

}


#2

i need to create a new object MyOrder of the type Coffee after the dog workout


#3

i dont get it why it didint work at start...
class Coffee extends Beverage {

public Coffee() {

}

public void addSugar(int cubes) {

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

}

public static void main(String[] args) {

Coffee myOrder = new Coffee();
myOrder.addSugar(2);
myOrder.isFull();

}

}