aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Confused over widening+vargs overlaoding with Boxing+vargs 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 "Confused over widening+vargs overlaoding with Boxing+vargs" Watch "Confused over widening+vargs overlaoding with Boxing+vargs" New topic
Author

Confused over widening+vargs overlaoding with Boxing+vargs

Don Redd
Ranch Hand

Joined: Jan 05, 2012
Posts: 82

Hi,

I have gone through some of good topics and thoughts posted related to this concept,But I am still unable to understand this behavior.




In the above code piece, this is how am thinking,
First: int has two choices to become a)long b)Integer then applying ...(var args) over widening or boxing.
Second: since widening beats boxing. int ==hast to become=====>long and var args are applied

and as per my thinking answer should be method(long... i){} ,but actual answer is ambiguity why?
Enkita mody
Ranch Hand

Joined: Aug 06, 2012
Posts: 333

Search old threads.Have a look here.


OCA7
R. Jain
Ranch Hand

Joined: Aug 11, 2012
Posts: 375
    
    1

See this post..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Confused over widening+vargs overlaoding with Boxing+vargs