aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Constructor arguments in Wrappers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Constructor arguments in Wrappers" Watch "Constructor arguments in Wrappers" New topic
Author

Constructor arguments in Wrappers

vijayakrishna Mikkilineni
Greenhorn

Joined: Nov 10, 2009
Posts: 24
The following code compiles:


But how is it possible. In java docs, Boolean class has only two types of constructors:


Does Auto boxing apply to constructor args also or is it to only method args?


Vijayakrishna M
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

This code snippet should clear it up



It compiles just fine


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Rein de Boer
Greenhorn

Joined: Jul 12, 2009
Posts: 15
vijayakrishna Mikkilineni wrote:
Does Auto boxing apply to constructor args also or is it to only method args?


I would say that a constructor is like any method (with respect to the arguments).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Constructor arguments in Wrappers