The Java Course provides a general introduction to programming in Java. It is based on A.B. Downey's book, How to Think Like a Computer Scientist. Click here for details. |
![]() |
Home ![]() ![]() |
||
See also: Wrappers and Helpers, Creating Wrapper Objects, Getting the Values Out, Useful Methods in the Wrapper Classes | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||
Wrapper Classes
For every primitive type in Java, there is a built-in object type called a wrapper class. For example, the wrapper class for int is called Integer; for double it is called Double. Wrapper classes are useful for several reasons:
|
||
Home ![]() ![]() |