eclipse提示Syntax error, insert “EnumBody” to complete EnumDeclaration

时间:2025-03-23 08:15:19

eclipse提示Syntax error, insert “EnumBody” to complete EnumDeclaration

从网上复制下面代码没注意看格式,把行号也带上了,去掉序号代码就正常了

public class Screen
 2 {
 3     public static void main(String[] args)
 4     {
 5            int screenWidth=((int)().getScreenSize().width);
 6            int screenHeight = ((int)().getScreenSize().height); 
 7            (screenWidth+""+screenHeight);
 8      }
 9 }