Home arrow static arrow Java Programming [Archive] - Simple replaceALL mind block problem
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Simple replaceALL mind block problem
This topic has 3 replies on 1 page.

Posts:2
Registered: 6/27/04
Simple replaceALL mind block problem  
Jun 27, 2004 5:26 PM



 
I am using NetBeans 3.5.1
JDK 1.4.2

My imports are
import java.beans.*;
import java.io.*;
import java.lang.*;
import java.sql.*;
import java.util.*;

I get a cannot resolve symbol compile error on the following code

String tmp = "00,00";
tmp = tmp.replaceALL("[,]","");

?!!!!
I think my problem is so simple I can not see it.
 

Posts:31,095
Registered: 4/30/99
Re: Simple replaceALL mind block problem  
Jun 27, 2004 5:33 PM (reply 1 of 3)



 
The name of the method is "replaceAll" and not "replaceALL". Capitalization counts in Java.
 

Posts:2
Registered: 6/27/04
Re: Simple replaceALL mind block problem  
Jun 27, 2004 5:41 PM (reply 2 of 3)



 
Interesting when I did the . in NetBeans and waited for the dropdown it put in replaceALL and I did not think to check if the tool made an error. I knew it was simple thanks.
 

Posts:3,183
Registered: 10.09.03
Re: Simple replaceALL mind block problem  
Jun 27, 2004 11:48 PM (reply 3 of 3)



 
next time just read what Java has to say about it. It will have said something like "cannot resolve symbol replaceALL".
 
This topic has 3 replies on 1 page.