Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Typesafe constants/enums, Defensive Copying and Immutable Objects

 
Rodney Woodruff
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I was reading an article at http://www.theserverside.com/home/thread.jsp?thread_id=18040&article_count=37 and figured I would come here to seek answers for this question.
I did search the forum before posting this question but did not find descriptive answers to my questions.
I would like to know if anyone can define the following terms for me as I realize that I don't know the answers as well as I should.
1. Typesafe constants/enumerations (I know what a constant and an enumeration are but I don't know how to make them typesafe or what that means.
2. Defensive Copying
3. Immutable Objects (I have more of an idea about this one but could use some enlightening.)
Any and all help is appreciated
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rodney,
1. Typesafe constants/enumerations (I know what a constant and an enumeration are but I don't know how to make them typesafe or what that means.
I think this is relevant:
http://www.javaworld.com/javaworld/javatips/jw-javatip133.html
2. Defensive Copying
I think this is relevant:
http://www.javareport.com/java/articleold.asp?id=223&mon=1&yr=2000
3. Immutable Objects (I have more of an idea about this one but could use some enlightening.)
I think this is relevant:
http://www.javaworld.com/javaworld/javaqa/2002-12/01-qa-1206-immutable.html
Hope this helps you.
Good Luck,
Avi.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Rodney,
Forgot this article:
http://www-106.ibm.com/developerworks/java/library/j-jtp02183.html?dwzone=java
(In relation to your third question)
[It's awfully hard to remember where I read these articles from, sometimes!]
Good Luck,
Avi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic