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 about abstract classes in java?
What is meant by call by reference?
Which package is imported by default?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What are the disadvantages of using inner classes?
What does opcode mean?
Is there a way to increase the size of an array after its declaration?
Which is better 64 bit or 32 bit?
Can a static class have a constructor java?
What is finalize() function in java?
Difference between notify() method and notifyall() method in java?
What is the difference between inheritance and encapsulation?
Why do we need data structure in java?
What is the difference between overriding & overloading?
Why we do exception handling in java and how many types of exceptions are there?