对话框输出
JOptionPane.showMessageDialog(null,"hello world");
JOptionPane.showMessageDialog(null, "再见","showuser",JOptionPane.ERROR_MESSAGE);
控制台输出颜色
for (int i = 0; i < 6; i++) {
System.out.printf("\033[%dm%s\033[0m%n", 30 + i, "hello");
控制台输入
var sc = new Scanner(System.in);
System.out.print("请输入姓名");
String name = sc.nextLine();
System.out.printf("%n欢迎你:%s。", name);