Sm0ke
21-07-2017 22:00 Wrapper
In summary, the essential method signatures for Wrapper conversion methods are
primitive xxxValue() - to convert a Wrapper to a primitive
primitive parseXxx(String) - to convert a String to a primitive
Wrapper valueOf(String) - to convert a String to a Wrapper

In order to save memory, two instances of the
following wrapper objects (created through boxing), will always be == when their
primitive values are the same:
■ Boolean
■ Byte
■ Character from \u0000 to \u007f (7f is 127 in decimal)
■ Short and Integer from -128 to 127

Here's a review of the rules for overloading methods using widening, boxing,
and var-args:
■ Primitive widening uses the "smallest" method argument possible.
■ Used individually, boxing and var-args are compatible with overloading.
■ You CANNOT widen from one wrapper type to another. (IS-A fails.)
■ You CANNOT widen and then box. (An int can't become a Long.)
■ You can box and then widen. (An int can become an Object, via Integer.)
■ You can combine var-args with either widening or boxing

Current music: Радио Яндекс: Dvipada Pitham -The Wise Man
Состояние: прострация
Группы: [ english ] [ java ]

Ваш комментарий:
Гость []
[смайлики сайта]
Автоматическое распознавание URL
Не преобразовывать смайлики
Cкрыть комментарий
Закрыть