Is there a goto statement in Java?

前端 未结 23 1945
醉酒成梦
醉酒成梦 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:39

    Note that you can replace most of the benign uses of goto by

    • return

    • break

    • break label

    • throw inside try-catch-finally

提交回复
热议问题