"?" printed instead of emoji

88 views Asked by At

When coding the emojis, despite using utf-8s, it only outputs "?".

System.out.print(boyName + ", will you be my boyfriend? ");
String response = scanner.nextLine();

switch (response.toLowerCase()) 
{
    case "yes":
        System.out.println("Yay! \uD83D\uDE0A"); 
        break;
    case "maybe":
        System.out.println("I'll wait for your decision! \uD83E\uDD14");
        break;
    case "no":
        System.out.println("\uD83D\uDE22"); 
        break;
    default:
        System.out.println("gulo mo, 3 na nga lang pagpipilian");
}
0

There are 0 answers