File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error : Wrong number of arguments " Watch "Error : Wrong number of arguments " New topic
Author

Error : Wrong number of arguments

jyoti Dadsena
Greenhorn

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

I got an error like
Play_jsp_4.java:1395: 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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Look at the API for the Character method in version 1.3:
http://java.sun.com/j2se/1.3/docs/api/java/lang/Character.html

There is only a toString method that takes no arguments.





The toString(char) method didn't show up until 1.4:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Character.html#toString(char)


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

Joined: Oct 27, 2005
Posts: 19541
    
  16

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error : Wrong number of arguments
 
Similar Threads
Unable to locate shared memory
Highest Number of Consecutive Primes
wrong value being returned
Cannot conect to mySql DB after changing DB from HSQL to mySql in JBOSS 5
Null pointer Exception thrown in JadeGatewayServlet