Java Enum Fields and Methods

Report a typo

Consider the following enum declaration in Java:

public enum CoffeeSize { 
    SMALL(100), MEDIUM(200), LARGE(300); 

    private int mlSize; 

    CoffeeSize(int size) { 
        this.mlSize = size; 
    } 

    public int getSize() { 
        return mlSize; 
    } 
}

Which statements are correct?

Select one or more options from the list
___

Create a free account to access the full topic