java: 需要class, interface或enum解决方法 Java代码运行出错一 1、出错代码 2、idea报错提示 3、问题分析 如果是在新建之后,想在main函数之前写其他函数,要注意class的括号,应该包括main函数 4、问题解决 修改class大括号的位置