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 math exp in java?
what is meant by encapsulation?
What is the default access specifier for variables and methods of a class?
What is jvm? Why is java called the platform independent programming language?
What are the two ways of implementing multi-threading in java?
What is the use of default method in interface in java? Explain
What is the difference between a local variable and an instance variable?
What is the use of beaninfo?
Explain about strings in java?
what are the methods in object?
What data structures are used to perform recursion?
What is an escape character in java?
What is += mean in java?
What's the difference between comparison done by equals method and == operator?
Describe the syntax of multiple inheritance? When do we use such an inheritance?