开发者社区> 问答> 正文

小白求助,安卓APP开发时eclipse里报错insert "Enum?报错

安卓APP开发Java码里
public static enum connectionStateEnum{
static{
isConnecting=new connectionStateEnum("isConnecting", 3);
isConnected = new connectionStateEnum("isConnected", 4);
isDisconnecting = new connectionStateEnum("isDisconnecting", 5);
connectionStateEnum[] arrayOfconnectionStateEnum = new connectionStateEnum[6];
arrayOfconnectionStateEnum[0] = isNull;
arrayOfconnectionStateEnum[1] = isScanning;
arrayOfconnectionStateEnum[2] = isToScan;
arrayOfconnectionStateEnum[3] = isConnecting;
arrayOfconnectionStateEnum[4] = isConnected;
arrayOfconnectionStateEnum[5] = isDisconnecting;
}
}

复制了别人正确的代码,但在eclipse里一直报错
Syntax error, insert "EnumBody" to complete EnumDeclaration
应该怎么修改呀?
小白求助,感谢

展开
收起
爱吃鱼的程序员 2020-06-23 15:22:17 835 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    http://blog.csdn.net/growth58/article/details/43449249

    2020-06-23 15:22:36
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
女性移动App安全攻防战 立即下载
汇聚云计算的生态核能——云市场,云上APP Store 立即下载
千万级用户直播App——服务端架构设计和思考 立即下载

相关实验场景

更多

相关镜像