true、false是不是关键字?

java中的关键字有哪些?

结论:true不是关键字

答:

  1. 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
  1. 2个保留字(现在没用以后可能用到作为关键字):
goto、const
  1. 3个特殊直接量:
true、false、null
posted @ 2021-09-22 20:10  SeaWaveLin  阅读(589)  评论(0编辑  收藏  举报