709. To Lower Case(Solution || Leetode easy || Java)
Nov 22, 2022
Given a string s
, return the string after replacing every uppercase letter with the same lowercase letter.
Example 1:
Input: s = "Hello"
Output: "hello"
Example 2:
Input: s = "here"
Output: "here"
Example 3:
Input: s = "LOVELY"
Output: "lovely"
Constraints:
1 <= s.length <= 100
s
consists of printable ASCII characters.
SOLUTION:
class Solution {
public String toLowerCase(String s) {
return s.toLowerCase();
}
}
Runtime: 1 ms, faster than 84.92% of Java online submissions for To Lower Case.
Memory Usage: 42.2 MB, less than 39.36% of Java online submissions for To Lower Case.
Thank you for reading.If you have any queries then, please let meknow in the comment section. I will surely be responsive toward it.