Answer Posted / manikandan [ gtec,vellore ]
there are different type of data types such as int,char
etc.for example suppose if we using arrays it can store a
similar data types but we need to store a char and int in a
same array what can we do for this situation. the wrapper
class helps in this situation by storing a objects in to a
arrays.
example
ArrayList v=new ArrayList();
v.add(new Integer(1));
v.add(new Character('a'));//
the int and char are different type but we stores it by an
object.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is multithreading and its advantages?
What is substring in java?
Can we use synchronized block for primitives?
What exceptions occur during serialization?
Why javac is not recognized?
how to create multithreaded program? : Java thread
How do you escape in java?
What are the 3 types of control structures?
What is starvation?
Can a main method be overloaded?
What is the numeric promotion?
What is scope of a variable?
How to create com object in Java?
Can you use abstract and final both with a method?
What is bufferedwriter?