• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is the Math class considered immutable?

 
Bob Graffagnino
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the Math class considered immutable?
 
Bob Graffagnino
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose objects are immutable, not classes. Since the Math class cannot be instantiated, the answers to my original question is - NO!
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Immutability has to do with the state of an object. We say that an object is immutable when you cannot change its state after its creation (Wrapper classes, String,...). The Math class has no state, that is, it does not declare any members, except the two constants PI and E.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic