Is there a goto statement in Java?

前端 未结 23 1984
醉酒成梦
醉酒成梦 2020-11-22 04:50

I\'m confused about this. Most of us have been told that there isn\'t any goto statement in Java.

But I found that it is one of the keywords in Java. Where can it be

23条回答
  •  别那么骄傲
    2020-11-22 05:47

    http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.goto

    If you have been told that there is no goto statement in Java you have been fooled. Indeed, Java consists two layers of 'source' code.

提交回复
热议问题