ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1720)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (43)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (195)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (145)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
What is a Wrapper class?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is a Wrapper class?
Answer
# 1
When we need to store primitive datatypes as objects, we use
wrapper classes.MEans in utility classes all the utility
classes stores Objects.So when we need to store a primitive
datatype.We make an object of theat primitive data and store it.

Thats why we use Wrapper classes in Java.
 
Is This Answer Correct ?    171 Yes 21 No
Debapriya Patra
 
  Re: What is a Wrapper class?
Answer
# 2
Wrapper classes are classes that allow primitive types to
be accessed as objects.
 
Is This Answer Correct ?    111 Yes 18 No
Janet
 
 
 
  Re: What is a Wrapper class?
Answer
# 3
wrapper class allows us to make use of primitive datatypes
as objects
 
Is This Answer Correct ?    55 Yes 16 No
Ravikiran
 
  Re: What is a Wrapper class?
Answer
# 4
Wrapper classes are classes that allow primitive types to
be accessed as objects.
 
Is This Answer Correct ?    50 Yes 13 No
Nikhil
 
  Re: What is a Wrapper class?
Answer
# 5
Say supposing there is a requirement to store only the
object in an array A.The Primitive types cannot be stored in
the same array as the array can accommodate only Objects
here is where Wrapper Class come into picture.ie, we create
wrapper for the primitive types.One such example is as below

Ex:int i;
Wrapper class for the primitive type(int) is created as below:

INTEGER i = new INTEGER();
 
Is This Answer Correct ?    58 Yes 14 No
Praveen
 
  Re: What is a Wrapper class?
Answer
# 6
wrapper classes is nothing but the primitive datatypes make
as a class name is called a wrapper class
 
Is This Answer Correct ?    20 Yes 13 No
Vinay
 
  Re: What is a Wrapper class?
Answer
# 7
we can't store the different types of objects(primitive
datatypes can not be stored) in the same array(same types
of objects can be stored). so, we can crate a primitive
data type for int i;
as INTEGER i = new INTEGEr();
This is the procedure actually going on.
 
Is This Answer Correct ?    15 Yes 8 No
Srinivas D
 
  Re: What is a Wrapper class?
Answer
# 8
ExAMPLE:

int i=100 // declaration of primitive type.

/* wrapping the primitive data type to corresponding wrapper
class object */

Integer i1=new Integer(i);
 
Is This Answer Correct ?    31 Yes 5 No
Kanaparthi Srinivas
 
  Re: What is a Wrapper class?
Answer
# 9
A primitive wrapper class in the Java programming language
is one of eight classes provided in the java.lang package to
provide object methods for the eight primitive types. All of
the primitive wrapper classes in Java are immutable. J2SE
5.0 introduced autoboxing of primitive types into their
wrapper object, and automatic unboxing of the wrapper
objects into their primitive value—the implicit conversion
between the wrapper objects and primitive values.

Wrapper classes are used to represent primitive values when
an Object is required. The wrapper classes are used
extensively with Collection classes in the java.util package
and with the classes in the java.lang.reflect reflection
package.

The primitive wrapper classes and their corresponding
primitive types are:

Primitive type Wrapper class Constructor Arguments
byte Byte byte or String
short Short short or String
int Integer int or String
long Long long or String
float Float float, double or String
double Double double or String
char Character char
boolean Boolean boolean or String

The Byte, Short, Integer, Long, Float, and Double wrapper
classes are all subclasses of the Number class.
 
Is This Answer Correct ?    27 Yes 10 No
Darshan
 
  Re: What is a Wrapper class?
Answer
# 10
Nothing is impossible 
Is This Answer Correct ?    16 Yes 52 No
Mk@yahoo.co.in
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
I have 100 records in a table with two rows. I need to display 10 records per page like Google Search. I need only the Logic(Pagination) in Pure Java. No JSP and all..Thanks in Advance... Cybernet 2
whst is encapsulation?when u encpsulate actually while devoloping code? AMDOC 7
What is Distributed Application and what is its usage?   2
How to send a request to garbage collector?   4
Write the code for Palindrome ? Bally-Technologies 2
How multipleInheritance is possible in java? Satyam 18
why interaction with server using javascript is difficult   1
How to find the size of an array a)array.length() b)array.length c)array.size() d)array.size Accenture 6
why java is platform independent? IBM 5
What modifiers are used with an inner class which is a member of an outerclass?   1
Diff between C++ and java? TCS 9
Inorder to specify a container?s layout, which method is used?   1
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright © 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com