codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  can`t compile...  rsixtyone at 03:48 on Saturday, September 24, 2005
 

hello all, I can't compile the following code segment:

class StringTest

{
public static void main(String[] args)
{
int v1 = 3;
double v2 = 1.414;
char v3 = 'c';
String s1 = String.valueof(v1);
String s2 = String.valueof(v2);
String s3 = String.valueof(v3);
}
}

  Re: can`t compile...  crwood at 04:46 on Saturday, September 24, 2005
 

The compiler tells the details:

C:\jexp>javac stringtest.java
stringtest.java:8: cannot find symbol
symbol : method valueof(int)
location: class java.lang.String
String s1 = String.valueof(v1);
^
stringtest.java:9: cannot find symbol
symbol : method valueof(double)
location: class java.lang.String
String s2 = String.valueof(v2);
^
stringtest.java:10: cannot find symbol
symbol : method valueof(char)
location: class java.lang.String
String s3 = String.valueof(v3);
^
3 errors

It cannot find the symbol = method "valueof"
Look in the String api for this method and find it is spelled "valueOf"









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Date script issues
•  perl script help needed
•  onChange issue
•  perl remote execution
•  Chat application
•  How to send multiple perameters in SOAP request.
•  Java code for Insert picture on the table in spreadsheet
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007