Need your help please

Hello everyone,
I’m a beginner here and I’ve just learnt Java for 2 days
For this exercise, I don’t get why I have to creat the class Beverage, why I can’t just public isFull
Thank you!

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();
              class Beverage{
    	      public void isFull(){   
             System.out.println("Full order");      
1 Like

Something looks fishy, here. Are you sure that Beverage class is in the right place?


Yes I’m sure. It works and allows me to pass.

1 Like