The Artima Developer Community
Sponsored Link

Java Answers Forum
Setters/Getters: Related To JavaBeans Only?

1 reply on 1 page. Most recent reply: Mar 20, 2004 6:22 AM by twc

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Kevin

Posts: 25
Nickname: doublek321
Registered: Jan, 2004

Setters/Getters: Related To JavaBeans Only? Posted: Mar 19, 2004 8:50 PM
Reply to this message Reply
Advertisement
I guess I'm wondering if the "design pattern" (I think that's the correct term) where you use "setters" and "getters" applies to JavaBeans only or to other things as well.


twc

Posts: 129
Nickname: twc
Registered: Feb, 2004

Re: Setters/Getters: Related To JavaBeans Only? Posted: Mar 20, 2004 6:22 AM
Reply to this message Reply
If you look at the classes that come with Java, you will see that pattern quite a bit. Some classes, notably the String class, are immutable, so they will not have any mutator (set) methods, but they usually have accessor (get) methods.

twc

Flat View: This topic has 1 reply on 1 page
Topic: how to operate macro using java ? Previous Topic   Next Topic Topic: Date Formatting Question

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use