• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Wrapper classes ??

 
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
testing Objectives:
I could not find any refernece of Wrapper classes except for Boolean ...
so what does it mean .. other wrapper classes are not asked ??
TIA
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The exam can cover any of the 'wraper' classes. Every primitive type has a wraper.
char = Character
int = Integer
float = Float
double = Double
short = Short
byte = Byte
They can be used to store primitive values in structures like Vector and HashMap which only store reference types.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It certainly wouldn't hurt to be familiar with them. Most important points to know about them probably would be that they are immutable and final. You should also know what kind of constructors each has and the constants defined for them such as Double.NaN, Integer.MIN_VALUE, etc.
Off the top of your head, can you answer the following question?
Question: Is the following code legal?
double d = Double.MAX_VALUE;
Float f = new Float(d);
[ January 30, 2002: Message edited by: Junilu Lacar ]
 
R K Singh
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Junilu and all..
Junilu tahnsk ...
 
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Float f = new Float(d);
why is this not giving a compile error ? the constructor of Float expects a float value ? i think d is a double value ? right ?

Originally posted by Junilu Lacar:
It certainly wouldn't hurt to be familiar with them. Most important points to know about them probably would be that they are immutable and final. You should also know what kind of constructors each has and the constants defined for them such as Double.NaN, Integer.MIN_VALUE, etc.
Off the top of your head, can you answer the following question?
Question: Is the following code legal?
double d = Double.MAX_VALUE;
Float f = new Float(d);
[ January 30, 2002: Message edited by: Junilu Lacar ]

 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mark,
FYI the Float class does have a constructor taking a double as argument...
[ January 30, 2002: Message edited by: Valentin Crettaz ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic