This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error : Wrong number of arguments

 
jyoti Dadsena
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic