use of wrapper classes?
Answers were Sorted based on User's Feedback
Collection accepts only object not primitive data-type And
server also works on only Objects.
So By help of wrapper class we can convert primitive
data-type to Object.
Is This Answer Correct ? | 18 Yes | 0 No |
Answer / vino
wrappper class uses for primitive datatype act as object.
ex:int-Integer
Is This Answer Correct ? | 0 Yes | 0 No |
Wrapper classes are used to wrap primitive types (eg: int,
double, etc) in Objects which can be placed into Vectors,
and many, many other uses.
Following table lists the primitive types and the
corresponding wrapper classes:
Primitive Wrapper
Boolean java.lang.Boolean
Byte java.lang.Byte
Char java.lang.Character
double java.lang.Double
Float java.lang.Float
Int java.lang.Integer
Long java.lang.Long
Short java.lang.Short
Void java.lang.Void
Is This Answer Correct ? | 1 Yes | 3 No |
Does chrome use java?
What is the basic difference between string and stringbuffer object?
how and when compiler knows that the Java code throws the checked Exception.
Write a program to find the greatest of three numbers in java?
What does string intern() method do?
How to add menushortcut to menu item?
Define immutable object?
Can a method be overloaded based on different return type but same argument type?
does java support default argument in Method?
What is the main purpose of serialization in java?
What happens when I use / and % with a negative numerator?
make a method which any number and any type of argument and print sum of that arguments.....