IT Community - Software Programming, Web Development and Technical Support

wrapper class

This is a discussion on wrapper class within the Java Programming forums, part of the Software Development category; pls explain about wrapper class...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 05-10-2007, 11:23 PM
leoraja8 leoraja8 is offline
D-Web Sr.Programmer
 
Join Date: May 2007
Posts: 188
leoraja8 is on a distinguished road
Default wrapper class

pls explain about wrapper class
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 05-11-2007, 03:17 AM
jeyaprakash.c jeyaprakash.c is offline
D-Web Sr.Programmer
 
Join Date: May 2007
Posts: 194
jeyaprakash.c is on a distinguished road
Arrow Re: wrapper class

Wrapper class is exactly wrap primitive types (eg: int, double, etc) in Objects which can be placed into Vectors, and many, many other uses

creating wrapper classes

Integer i = Integer.valueOf("125");

the more common use is given the primitive in a variable.

Integer

Integer I = Integer.valueOf(i); //Wrapper
int i2 = I.intValue(); //back to primitive

boolean

boolean b = true;
Boolean B = Boolean.valueOf(b); //Wrapper
boolean b2 = B.booleanValue(); //back to primitive
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
wrapper class sivakumar C# Programming 2 08-25-2007 02:15 AM
Debug class and Trace class simplesabita Software Testing 3 08-17-2007 11:30 PM
Can we inherit the java class in C# class vigneshgets C# Programming 1 08-09-2007 06:42 AM
Is there any way to use keyPressed method of Canvas class in Form class? bluesky Mobile Software Development 1 07-25-2007 05:02 AM
What is super class sub class in error? santoshmalvi Software Testing 1 04-16-2007 12:20 AM


All times are GMT -7. The time now is 12:34 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
Stamford Dentist | Euro Millions Lottery | Tech Support Services

SEO by vBSEO 3.0.0