toLowerCase() and toUpperCase()

If we want to convert all string characters into lower case or upper case, we can use these methods. toLowerCase() This method returns the string with all the characters converted into lower case if any in upper case. There are 2 overloaded methods in toLowerCase() One which takes locale and one which does not. Signature […]

Share this article on

String replace

We have replace() method in java which returns a new string by replacing all the characters or CharSequences with a specified new character or CharSequence. There are 4 methods for replacing a string or char value public String replace(char oldChar, char newChar) public String replace(CharSequence target,CharSequence replacement) Public String replaceAll(String regex, String replacement) Public String […]

Share this article on
< Previous Next >