未赋值就使用,会出错
public class Main { public static void main(String[] args) { int x; // 定义int类型变量x,并赋予初始值100 System.out.println(1+x); // 打印该变量的值//variable x might not have been initialized } }