请用户输入一个String类型的数/即字符串 ————
String input; input = new Scanner(System.in).nextLine();
从控制台接受用户输入的数据————
int a = new Scanner(System.in).nextInt();
生成随机数 随机数的范围:[0,100) ————
int a = new Random().nextInt(100);
Random需要导包
动态生成UUID——防止文件重名 UUID
String UUID = java.util.UUID.randomUUID().toString();
给程序添加计时功能 ————
System.currentTimeMillis();
定义一个变量用来保存最终的效果(即可以定义一个空串)————
String result = "";
当需要定义一个String类型的变量来保存结果,却又不知道初始值定义成多少,可以定义成空的,就两个""