Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Constructor arguments in Wrappers

 
vijayakrishna Mikkilineni
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code snippet should clear it up



It compiles just fine
 
Rein de Boer
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic