This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FAQ

 
zarina mohammad
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does this statement mean? i found it in the FAQ list of JavaRanch
Math class being an option for immutable classes

does it simply mean that Math class being a final class cannot be subclassed. i.e its immutable.?
can someone please elaborate the above quote.
thanks
zarina
 
Corey McGlone
Ranch Hand
Posts: 3271
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Immutable means that, once an object is instatiated, it can't be changed. I'd say that the wrapper classes and String are better examples than Math. Math can't be instatiated at all so there isn't much sense in saying that it's immutable.
Just because a class is final, it isn't necessarily immutable, and vice-versa.
Corey
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic