Answer Posted / rakesh
It is sometimes easier to deal with primitives as objects.
Moreover most of the collection classes store objects and
not primitive data types. And also the wrapper classes
provide many utility methods also. Because of these resons
we need wrapper classes. And since we create instances of
these classes we can store them in any of the collection
classes and pass them around as a collection. Also we can
pass them around as method parameters where a method expects
an object.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What's the access scope of protected access specifier?
What is the difference between variable & constant?
What are the differences between heap and stack memory?
What is the use of StringTokenizer class?
What is the purpose of garbage collection in java?
How do you use substring in java?
What is jit and its use?
Is string is a keyword in java?
Why string objects are immutable in java?
What is garbage collection? What is the process that is responsible for doing that in java?
what are abstract functions?
Is Java a dying language?
What is stringreader?
Why char array is favored over string for the storage of passwords?
What is the purpose of file class?