• Post Reply Bookmark Topic Watch Topic
  • New Topic

[try2solve]non-varargsCall ofVarargsMethodWith inexact argumentTypeForLastParameter;  RSS feed

 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
following is an open source download from internet
when i compile it prompt messsage
"non-varargs call of varargs method with inexact argument type for last parameter;"


this is the problem area but i'm not sure how to get around it..

any help would be appreciated.please show me example change of code since i newbie in java

Sincerely

willie

[ October 15, 2008: Message edited by: L Willie ]

[ October 15, 2008: Message edited by: L Willie ]

[ October 15, 2008: Message edited by: L Willie ]

[ October 15, 2008: Message edited by: L Willie ]
[ October 16, 2008: Message edited by: L Willie ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The format method uses var-args. You have two arguments {0} and {1}. The compiler sees only one parameter, which is new String[]{}. The compiler is asking you : Where is the other parameter ?

You don't need to pass the parameters with an array. Just use :

[ October 15, 2008: Message edited by: Christophe Verre ]
 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank Christophe
 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint eprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
24 errors
65 warnings

Process completed.

after remove all new string[]{} for same situation,it show new error messsage
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it show new error messsage

What new error message ? Please post the exact message.
 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Christophe Verre:

What new error message ? Please post the exact message.


sorry for late reply.i might guess the cause of problem.i trying to solve it 1st
[ October 16, 2008: Message edited by: L Willie ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!