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
Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?
What does this mean java?
What is the major difference between linkedlist and arraylist?
What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?
What is meant by singleton class?
Is it safe to install java on my computer?
give an example for encapsulation?
Give reasons supporting that string is immutable.
can java object be locked down for exclusive use by a given thread? : Java thread
What is a boolean flag in java?
What is numeric data type?
Tell me the latest versions in java related areas?
What are the differences between abstract class and interface?
When throws keyword is used?
Why main() method is public, static and void in java ?