+ 3
How can I add or use emojis in my java program?
I'm a beginner in java, and i want to make a program which returns an emoji when the user types the text version of it. When I use string for emojis, it says "no output". For example: If the input is ":D" then the expected output is "😀". Here's the code: import java.util.*; public class Emojis{ public static void main(String [] args){ String emoji = "😀"; Scanner obj1 = new Scanner(System.in); String in = obj1.next(); if (in == ":D"){ System.out.println(emoji); } } } Please let me know if there are any mistakes in my code😊
4 ответов
+ 2
Thank you😊
0
Search for emoji Unicode
0
hsg^÷_