This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes FAQ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "FAQ" Watch "FAQ" New topic


zarina mohammad
Ranch Hand

Joined: Jun 26, 2002
Posts: 104
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.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
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.

SCJP Tipline, etc.
I agree. Here's the link:
subject: FAQ
Similar Threads
Traps to be aware of in any SCJP test !!!!! :)
Math class immutable
Ajith's trips/traps in the FAQ
Tript/traps for SCJP
Is the Math class considered immutable?