-1

I was reading a book and found the below code :

orgnlList: for (Integer number : numbers) 

orgnlList is not a variable. So please explain what does it stand for?

fabian
  • 80,457
  • 12
  • 86
  • 114

1 Answers1

2

It is a label for a break statement. See https://docs.oracle.com/javase/tutorial/java/nutsandbolts/branch.html

Basically, using the instruction "break orgnlList;" will exit this loop.

Valette_Renoux
  • 366
  • 1
  • 9