File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Wrappers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Wrappers" Watch "Wrappers" New topic


Chetan Dodiya
Ranch Hand

Joined: Jun 27, 2008
Posts: 39
this q is from ExamLab


why in this program wrapper Byte is widen to Number
because Wrapper type cant widen...
so why this program works fine???

SCJP 1.5
Markus Klein

Joined: Aug 29, 2008
Posts: 19
Widening of reference variable depends on inheritance(so, Integer cannot be widened to Long. But, Integer widened to Number)
It is sorta covered in the JavaRanch Style Guide.
subject: Wrappers
Similar Threads
Boxing & Widening
Widening and boxing
Doubt in Devaka's Final Exam Question.
overloading example from examlab
Need help on Questions of wrapper classes