以下是 Java 代码,可以在控制台输出一个会动的爱心:
public class Love {
public static void main(String[] args) throws InterruptedException {
while (true) {
System.out.println("\033[31;1m❤️ \033[0m");
Thread.sleep(100);
System.out.println("\033[31;1m 💕 \033[0m");