wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Unboxing to vararg Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Unboxing to vararg" Watch "Unboxing to vararg" New topic

Unboxing to vararg

O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

Why does this fail with a compilation failure?

Stephan van Hulst

Joined: Sep 20, 2010
Posts: 3605

You can only unbox primitive wrappers. Integer[] is not a primitive wrapper, it's an array.
O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

I agree. Here's the link: http://aspose.com/file-tools
subject: Unboxing to vararg
Similar Threads
Please clarify why the following code works - Method Local Inner classes
Jxam #47
operator presedence
can't call another constructor from no-arg constructor