Question: Imagine that the String toUpperCase method did not exist and you were asked to write one. You cant use the String toUpperCase method, but you
Imagine that the String toUpperCase method did not exist and you were asked to write one. You cant use the String toUpperCase method, but you can use methods on Character.
Hint: There is a method Character.toUpperCase(char) which converts a char to uppercase.
Hint: There is a method Character.toString(char) which converts a char to a String.
public String toUpperCase(String str) {
write your code here
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
