java关键字是什么?

如题所述

C、D都不是,属于java字面常量

java关键字是电脑语言里事先定义的,有特别意义的标识符,有时又叫保留字,还有特别意义的变量。
Java的关键字对java的编译器有特殊的意义,他们用来表示一种数据类型,或者表示程序的结构等,关键字不能用作变量名、方法名、类名、包名和参数。

以下是java 关键字分类列表:(共50个,供大家参考)
访问控制:
private 私有的
protected 受保护的
public 公共的
类、方法和变量修饰符
abstract 声明抽象
class 类
extends 扩允,继承
final 终极,不可改变的
implements实现
interface 接口
native 本地
new 新,创建
static 静态
strictfp 严格,精准
synchronized 线程,同步
transient 短暂
volatile 易失
程序控制语句
break 跳出循环
continue 继续
return 返回
do 运行
while 循环
if 如果
else 反之
for 循环
instanceof 实例
switch 开关
case 返回开关里的结果
default 默认
错误处理
catch 处理异常
finally 有没有异常都执行
throw 抛出一个异常对象
throws 声明一个异常可能被抛出
try 捕获异常
包相关
import 引入
package 包
基本类型
boolean 布尔型
byte 字节型
char 字符型
double 双精度,
float 浮点
int 整型
long 长整型
short 短整型

变量引用
super 父类,超类
this 本类
void 无返回值

Java Language Keywords
Here's a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used. true, false, and null might seem like keywords, but they are actually literals; you cannot use them as identifiers in your programs.

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

*

not used

**

added in 1.2

***

added in 1.4

****

added in 5.0
温馨提示:答案为网友推荐,仅供参考
相似回答