• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confused over widening+vargs overlaoding with Boxing+vargs

 
Don Redd
Ranch Hand
Posts: 82
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 333
Firefox Browser Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search old threads.Have a look here.
 
R. Jain
Ranch Hand
Posts: 375
1
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this post..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic