于郑生 发表于 2013-8-16 15:59:04

[Oracle interview]Why do we need wrapper classes?

姜青林 发表于 2013-8-16 16:04:26

It issometimes easier to deal with primitives as objects. Moreover most of thecollection classes store objects and not primitive data types. And also thewrapper classes provide many utility methods also. Because of these resons weneed wrapper classes. And since we create instances of these classes we canstore them in any of the collection classes and pass them around as acollection. Also we can pass them around as method parameters where a methodexpects an object.
页: [1]
查看完整版本: [Oracle interview]Why do we need wrapper classes?