الرجوع
تسجيل الدخول

What is the correct way to call the doesHaveSkin method?

public class Fruit {
  public String myColor;
  public String myName;
  public boolean peel;
  public boolean doesHaveSkin() {
    return peel;
  }
  
  public static void main(String[] args) {
    Fruit fruit = new Fruit();
    // What is the correct way to call the doesHaveSkin method?
  }
}