I am replacing a single quote by double quote in a String

I am getting an error
Method replaceAll(java.lang.String, java.lang.String) not found in class java.lang.String.

my jdk version is 1.2.2

Can anyone help me so that i can use the same function without changing my java version

replaceAll doesn't exist in 1.2.2 You can find third party libraries for it in 1.3, and as of 1.4, it is standard, but it does not exist in 1.2 (although, if you search, you may find a third party library, but, as I said, I believe that was first available 1.3).

I would seriously suggest, however, updating your jdk. Sun doesn't even offer documentation for 1.2 anymore (at least not from the Java SE documentation sites).

Why do you not want to upgrade?

1.2 is end of life, and has been for years.
1.3 is going end of life soon, and in fact already is end of life for all platforms except Solaris.
Expect 1.4 to go end of life with the release of 1.7, probably next year.

my guess is that the kid has a terribly old book that comes with 1.2 and it thinks it can't use anything else.

As it is not the development environment and may require some time to upgrade

Well, if it's in a production environment, it's even more important to get it upgraded.

Sun does not support that version any longer, so any problems that may occur are yours (or more correctly your company's) responsibility to fix.

Also, let it be known, that (if I remember correctly) there are security related bugs with that version.

This article has been dead for over six months. Start a new discussion instead.