File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Error : Wrong number of arguments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error : Wrong number of arguments " Watch "Error : Wrong number of arguments " New topic

Error : Wrong number of arguments

jyoti Dadsena

Joined: Feb 04, 2008
Posts: 10
Hi All,

I got an error like Wrong number of arguments in method.
String sDays=Character.toString(sumDays.charAt(i));
while testing its working without any error. but when was tested on vendor side its got an error. My vendor used java 1.3 for testing & i used netbeans 5.0 & java 1.6. they told me its problem of java version but java 1.3 have Character class with to String method.

Please help me to resoled this error..

Thanks & regards.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Look at the API for the Character method in version 1.3:

There is only a toString method that takes no arguments.

The toString(char) method didn't show up until 1.4:

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Rob Spoor

Joined: Oct 27, 2005
Posts: 19896

From the source of Java 1.4.2:

So there's your workaround as well; String.valueOf(char) has been available since Java 1.0

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Error : Wrong number of arguments