almost 6 years ago
Sometime, we need to remove or replace some particular character from a String.
Below is the method by which we can accomplish this. I am using replaceAll() method of the String.
replaceAll() have two parameter as an arguments. First one is the list of character that you want to
replace and second is the string that you want to be replace with.
String name = Ja(v_)-a;
name = name.replaceAll([-)_(],);
System.out.println(New String : +name);
New String :Java
Exception is ^ character cannot be the first character of the list.
Hope it will help you.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Terms of Service
| © copyright 2021 FindNerd.com. All rights reserved.
Sign up using