Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Integer... and int...

 
Alina Petra
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a class has the following two overloaded methods:



The compiler complains about the ambiguous method when one tries to call method(1).

Could anyone explain why?
 
anil kuchana
Ranch Hand
Posts: 404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the point is using varargs is same as passing an array, just it hides the process..
in the above code the compiler just sees two arrays which are not more specific than other..
[ October 25, 2006: Message edited by: anil kuchana ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic