X1000: Writing an Accessor Method

You are working on a class that contains a field:

public class Hat
{
    private int size;

    ...
}

Write a getter method for the field size.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.