David Starr wrote:Feel free to enhance or correct these statements: From my understanding the setter and getter are set as private and separate due to protection from being altered and ease in updating.
The instance variable is private. The setter and getter are public. If you search for "encapsulation", you can read about why protection from alteration is useful. My favorite is that you can add validation.
David Starr wrote: Also, if a method is termed as 'void' how come the void bark() method is returning some print statements?
Bark isn't returning a print statement. It is calling a print statement. Just like your main method is calling setSize() and System.out.println(). Any method can call other methods. Only methods with a return type can return a value.