static {
try {
public static FileOutputStream fileOut = new FileOutputStream("D:/输出/" + fileName + "_main" + ".xlsx");
} catch (Exception e) {
throw new ExceptionInInitializerError(e);
}
}
我这么写 提示 变量 fileOut 的修饰符不合法;只允许使用“终态"
不写trycatch又提示 未处理的异常类型 FileNotFoundException