Labeled Statement block in Java?

后端 未结 4 1199
后悔当初
后悔当初 2020-11-29 11:39

I was browsing through some of the base Java objects when I found a section of code surrounded by a scan: {} block. The following code is from the toLowerCase()

4条回答
  •  有刺的猬
    2020-11-29 11:43

    It is a labeled block. where scan: is a label. It is commonly used when breaking/continue in case you have multiple loops. In this case break scan; simply breaks outta the labeled block(scan) when executed.

提交回复
热议问题