Re: what is this? Variable?
It's called a label. It's an old relic from way back when where you could simply "jump" to another section of code and start executing from there (via the infamous goto keyword). In Java, labels function a little differently. Technically goto is a defined keyword, but it doesn't do anything (and I think actually gives you a compile error). However, you could break/continue to a label. What that allows you to do is break or continue up multiple blocks.
Code Java:
label1:
for(int i = 0; i < 5; ++i)
{
for(int j = 0; j < 5;++j)
{
break label1; // breaks out of both loops, not just the inner loop
}
System.out.println("this will never execute");
}
Re: what is this? Variable?
thanks for the clear answer :)