【发布时间】:2021-04-01 15:20:55
【问题描述】:
i tried to use Answers which already were on stackOverflow but couldn't figure it out
这是我的代码, 如何在 Eclipse 控制台上打印表情符号 公共类 SipirtAnimal {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner kb = new Scanner(System.in);
String name = kb.next().toLowerCase();
System.out.println("================================================");
System.out.println("YOUR SPIRIT ANIMALS ACCORDING TO YOUR NAME ARE ");
for(int i=0; i<name.length(); i++) {
switch(name.charAt(i)) {
case 'a':{
String grinningFace = "\xF0\x9F\x98\x81";
System.out.print(b);
}
}
}
}
}
【问题讨论】: