一篇文章总结Java所有关键字

Java中的关键字有哪些?

Java共有50个关键字,其中分为48个关键字+2个保留字。

48个关键字为:
abstract、assert、boolean、break、byte、case、catch、char、class、continue、default、do、double、else、enum、extends、final、finally、float、for、if、implements、import、int、interface、instanceof、long、native、new、package、private、protected、public、return、short、static、strictfp、super、switch、synchronized、this、throw、throws、transient、try、void、volatile、while。

2个保留字(现在没用以后可能用到作为关键字):goto、const。

还有3个特殊直接量:true、false、null。

发布了65 篇原创文章 · 获赞 26 · 访问量 2913

猜你喜欢

转载自blog.csdn.net/weixin_43332735/article/details/104792474