File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Integer... and int...

 
Alina Petra
Greenhorn
Posts: 26
  • 0
  • 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
  • 0
  • 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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic