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
Why do we need hashmap in java?
Explain about join() method?
Can a class be final?
Can we have return statement in finally clause? What will happen?
What is difference between core java and java ee?
What is stringbuffer in java?
Why inputstreamreader is used in java?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is a instance variable in java?
What is numeric data type?
Can we return null in java?
What is json parser in java?
When is the finalize() called? What is the purpose of finalization?
Can we sort hashset in java?
What should I import for arraylist in java?