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 Java 8 in Action this week in the Java 8 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: 367
    
    1

See this post..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confused over widening+vargs overlaoding with Boxing+vargs
 
Similar Threads
Java Type Casting
Widening,Boxing and Var-Args Combined
code explanation needed
Overloading of wrapper vs primitive arguments( with and without varargs)
Var-args and method overloading doubt