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
How many ways can you break a singleton class in java?
What are parameters in a method?
What is r in java?
How do you use compareto in java?
Can we restart a thread already started in java?
What do you mean by multithreaded program?
Difference between string, string builder, and string buffer?
Does every java program need a main?
Write a program to reverse a number in java?
What is a priority queue java?
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
Can an object subclass another object?
What are the differences between heap and stack memory?
Can we split string with in java?
What do bitwise operators do?