Lowercase to Uppercase

题目:

Convert a lowercase character to uppercase.

分析:

解法:

public class Solution {
    /**
     * @param character a character
     * @return a character
     */
    public char lowercaseToUppercase(char character) {
        // Write your code here
        if (character < 97 || character > 122) {
            return character;
        }
        character -= 32;
        return character;
    }
}

results matching ""

    No results matching ""