一开始按照慕课上面老师的方法将shape类引入eclipse的时候,出现了
错误: 无法初始化模块 Shapes 中的主类 Shapes.MyPic
原因: java.lang.ClassFormatError: Duplicate method name "draw" with signature "(LGraphics;)V" in class file Shapes/Circle
这个时候我们去到module-info.java中

将下面代码复制进入该module中
requires java.desktop;

可以看见上面的程序都没有错误了

运行也能运行得通了
1467



被折叠的 条评论
为什么被折叠?



