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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply 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: 6588
    
    1

This code snippet should clear it up



It compiles just fine


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Constructor arguments in Wrappers
 
Similar Threads
Boolean: valueOf() and equality doubt
Boolean
AutoBoxing question
comparing Boolean wrappers objects
doubt in boxing