• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrapper Classes

 
suresh kamsa
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do we need wrapper classes. Where we implement them. Are they useful for certification exam.
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The wrapper classes, Boolean, Byte, Short, Character, Integer, Float, Double are used anytime you need to represent a primitive value as an Object.
Yes, the exam does include questions on wrapper classes.
The next version of my mock exam will have a new set of questions on the Byte wrapper class. I hope to have it up by 5:00 PM Pacific Time today, Friday, August 9.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read read this about Wrapper Classes and come back if things are not clear.
It's not perfect but will help to get the basic ideas.
Try Dan's exam.
-Barry
[ August 09, 2002: Message edited by: Barry Gaunt ]
 
suresh kamsa
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is wrapper objects are immutable?
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the wrapper classes, Boolean, Byte, Short, Character, Integer, Long, Float, and Double are immutable.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need a wrapper class anytime you want to store a primitive type (such as int or double) in a collection (such as a Set , List, or Map).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic