In this program i have traversed the substring and replaced the character in the string by replace method the char is not accepted in replace method so i have converted char into string and removed the substring char from a string. the replace method either takes a pair of char's or a pair of CharSequence's (of which String is a subclass, so it'll happily take a pair of String's). The replace method will replace all occurrences of a char or CharSequence. On the other hand, the first String arguments of replaceFirst and replaceAll are regular expressions.
-
Notifications
You must be signed in to change notification settings - Fork 0
karunkarthickc/Remove-substring-from-String-in-Java-using-string-functions
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published