标签: java input console output
主要思想是:某些变量打印到stdin,因此用户可以编辑并保存或保持不变。喜欢:
String value = "Old value"; Scanner scn = new Scanner(System.in); System.out.println("Input new value or press \"Enter\" to keep an old value"); System.in.write(value); value = scn.nextLine();