m*****e 发帖数: 126 | 1
First, sometimes you will need to store some values in
data structure such as Set and List, which need Objects
to be stored in. You can not add primitive value into
them. So you have to wrap the primitive value.
Second, wrapper classes also provide us many uselful
methods, such as converting String input of numbers to
numbers. You are certainly going to use one or two such
methods when you get user input from a TextField. |
|