Ad
  • Custom User Avatar

    you're trying to use "toUpperCase()" on a char instead of a String. Try String s1 = ("" + name.charAt(0)).toUpperCase();
    It changes the char to a String.

  • Custom User Avatar

    I initially tried

    String s1 = name.charAt(0).toUppercase());

    But it gave me a char cannot be defererenced error. I don't really understand the error unfortunately.