September 2011
Beginner
650 pages
15h 47m
English
In addition to the simple case of assignments, autoboxing automatically occurs whenever a primitive type must be converted into an object, and auto-unboxing takes place whenever an object must be converted into a primitive type. Thus, autoboxing/unboxing might occur when an argument is passed to a method or when a value is returned by a method. For example, consider the following:


This program displays the following result:
In the program, notice that m( ) specifies an Integer parameter. Inside main( ), m( ) is passed the ...
Read now
Unlock full access