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
Is java se open source?
How can we achieve thread safety in java?
Can we sort hashset in java?
What is module in oop?
When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?
Which containers use a flowlayout as their default layout in java programming?
FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?
What are the advantages of passing this into a method instead of the current class object itself?
What does \ mean in regex?
What is java developer skills?
What is variable argument in java?
When should you use arraylist and when should you use linkedlist?
Is set thread safe java?
What is an off by one error in java?
Why put method is used?