|
boolean |
byte |
char |
double |
float |
int |
long |
short |
public |
private |
|
protected |
abstract |
final |
native |
static |
strictfp |
synchronized |
transient |
colatile |
if |
|
else |
do |
while |
swicth |
case |
default |
for |
break |
continue |
assert |
|
class |
extends |
implements |
import |
instanceof |
interface |
new |
package |
super |
this |
|
catch |
finally |
try |
throw |
throws |
return |
void |
const |
goto |
enum |
Attention:
定义变量时要避开Java的保留字和关键字!
本文详细列举并解析了Java编程语言中的所有保留字和关键字,包括基本数据类型如boolean、byte、char等,以及控制结构关键字如if、else、do、while等,还有类与对象相关的public、private、protected等修饰符。文章提醒开发者在定义变量时应避免使用这些关键字。

被折叠的 条评论
为什么被折叠?



