Wipro Codilty

Complete an implementation of a function solution, that should return a string describing first character of the given string: "digit" for a digit, "lower" for a lowercase letter, "upper" for an uppercase letter and "other" for other characters. You can assume the characters are ASCII.

import java.util.*;
class Solution { 
    public String solution(String s) { char c = s.charAt(0); 
    if(Character.isUpperCase(c)) {  
        return "upper"; } else 
    if(Character.isLowerCase(c)) {  
        return "lower"; } else 
    if(Character.isDigit(c)) {  
        return "digit"; } 
    else { 
        return "other";
        } } }