class Apple { Apple getPeeled() { return Peeler.peel(tihis); } } 

What does the Apple type mean before the getPeeled method? I do not understand this design.

    2 answers 2

    This is the name of the class that contains this method. This means that this method returns a reference to an object of type Apple .

      This means that the method must necessarily return something that will be of type Apple

      As an example, int getSomething() indicates that the return value must be an integer