String replaceAll method (Java)

Posted by Mr CooL on Stack Overflow See other posts from Stack Overflow or by Mr CooL
Published on 2010-03-22T11:54:36Z Indexed on 2010/03/22 12:01 UTC
Read the original article Hit count: 291

Filed under:
|

I have following problem,

Code: String a="Yeahh, I have no a idea what's happening now!"; System.out.println(a); a=a.replaceAll("a", ""); System.out.println(a);

Before removing 'a', result: Yeahh, I have no a idea what's happening now!

Actual Result: After removing 'a', result: Yehh, I hve no ide wht's hppening now!

Desired Result: Yeahh, I have no idea what's happening now!

Anyone can gimme some advices to achieve my desired result?

© Stack Overflow or respective owner

Related posts about java

Related posts about string