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

Tript/traps for SCJP

 
shuba gopal
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Watch for Math class being an option for immutable classes"

What are immutable classes? Final classes?
 
Ikpefua Jacob-Obinyan
Ranch Hand
Posts: 394
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shuba gopal wrote:"Watch for Math class being an option for immutable classes"

Hello Shuba, the API indicates that Math class is a final class, meaning you have to abide by the regulations...The Dos and Donts of a final class, for example they CANNOT be subclassed, the exam creators will NOT set a "Trip-Trap" for you on wrapper classes or Strings because its easy for you to notice the "Trap"...

HtH

Ikpefua
 
shuba gopal
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Math class is not part of the SCJP.

Marking a class final does not make it immutable. This wiki article is a good starting point to learn about immutability - http://en.wikipedia.org/wiki/Immutable_object
 
Ikpefua Jacob-Obinyan
Ranch Hand
Posts: 394
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepak Bala wrote:The Math class is not part of the SCJP.

Hello Deepak...I didnt know that..Thank you for the information.

Regards

Ikpefua
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic