IDEA 中不能用do作为包名吗?

数据层对象用 XXDO命名,在 IDEA 中包名创建do的里面怎么不能创建java文件?

阅读 14k
1 个回答

因为do是保留字,不能做包名,你试试,下面这些都不行:

abstract  continue    for         new         switch
assert    default     goto        package     synchronized
boolean   do          if          private     this
break     double      implements  protected   throw
byte      else        import      public      throws
case      enum        instanceof  return      transient
catch     extends     int         short       try
char      final       interface   static      void
class     finally     long        strictfp    volatile
const     float       native      super       while
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题