0
点赞
收藏
分享

微信扫一扫

eclipse Syntax error on token "String", strictfp expected

1.情景展示

在eclipse当中,创建枚举类报错信息如下:

Syntax error on token "String", strictfp expected

eclipse Syntax error on token "String", strictfp expected_枚举类型

2.具体分析

在枚举类当中,当定义了属性后,必须为该枚举类定义元素,否则会爆出类似:Syntax error on token "String", strictfp expected的错误。

3.解决方案

这个错误,其实不用管,在我们添加枚举类型后就会自动消失。

eclipse Syntax error on token "String", strictfp expected_java_02

4.其它

如何创建枚举类?

在需要添加枚举类的位置,右键--》New--》Other(快捷键:Ctrl+N)

eclipse Syntax error on token "String", strictfp expected_枚举类型_03

选择Enum-->Next;

eclipse Syntax error on token "String", strictfp expected_后台开发工具_04

为枚举类起个好听的名字;

eclipse Syntax error on token "String", strictfp expected_枚举类_05

写在最后

  哪位大佬如若发现文章存在纰漏之处或需要补充更多内容,欢迎留言!!!

 作者:​​Marydon​​

举报

相关推荐

0 条评论