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
Can an interface be defined inside a class?
How many types of operators are there?
What is slash r?
What is a default constructor and also define copy contrucyor?
What is mvc in java?
How do you create a method in java?
What is array list in java?
What is a layout manager and what are different types of layout managers available in java awt?
Why are global variables used?
Explain reverse a linked list recursive java solution?
How do you override a method in java?
What are keywords and reserved words in java?
Is java an ide?
How does arrays sort work in java?
What is boolean false?