Java 中的关键字是保留字,表示预定义的操作、内部进程等。因此,关键字不能用作变量、函数、对象等的名称。关键字和标识符的主要区别在于,关键字是表示预定义操作的保留字,而标识符是变量、函数、对象等的名称。Java 中的一些关键字如下所示:abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while演示关键字的程序如下所示:示例 在线演示public class Example { public static void main(String[] args) { int i = 5; char c = 'A'; System.out.println("i = " + i); System.out.println("c = " + ... 阅读更多