Java 8 标识符/关键字列表

-4 java java-8

我最近一直在查看 Java 8 文档,并惊讶地看到这么多新标识符(例如消费者)。有人可以给我一份这些标识符的列表以及它们的含义吗?谢谢一堆!

Pat*_*ins 5

文档指出“由 ASCII 字母组成的 50 个字符序列保留用作关键字,不能用作标识符。”

完整列表是:

abstract   continue   for          new         switch assert    
default    if           package     synchronized boolean    do        
goto         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
Run Code Online (Sandbox Code Playgroud)

但是,这些不包括接口名称,例如Consumer