Fix errors in @Hohahihehu 's code, char is a primitive type.