Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setter and getter methods

807598Apr 14 2006 — edited Sep 2 2008
I noticed in some java examples they use setter and getter methods to set and retrieve variables or members. What is the advantages and disadvantages of using setter/getter methods?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2008
Added on Apr 14 2006
46 comments
962 views