Scanner scanner = new Scanner(System.in);
String line = scanner.nextLine();
System.out.println(line);
FileWriter fw = null;
File file = new File("test.txt");
if (! file.exists()){
file.createNewFile();
}
fw = new FileWriter(file);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(line.toUpperCase(),0,line.length());
bw.close();
Jenkins 有 maven 插件的,可以用
值得学习