Computer Applications
Differentiate between toLowerCase() and toUpperCase()
Java String Handling
ICSE 2005
39 Likes
Answer
toLowerCase() | toUpperCase() |
---|---|
Converts all characters of the String object to lower case | Converts all characters of the String object to upper case |
Example: String str = "HELLO"; System.out.println(str.toLowerCase()); Output of this code snippet will be hello. | Example: String str = "hello"; System.out.println(str.toUpperCase()); Output of this code snippet will be HELLO. |
Answered By
24 Likes