0

I labor under the delusion that this is a simple question which should have a simple answer. I say that because a simple google search of "what is mainLoop in Java" returns no such answer. I'm just looking for a Java 101 level answer to this question. The context in which I have encountered this is in this line of code:

mainLoop: for(StackTraceElement ste: Thread.currentThread().getStackTrace(){
    //stuff here
}

What is mainLoop in Java?

Will
  • 3,413
  • 7
  • 50
  • 107
  • 5
    it's lable .important when you want a break or continue – Madhawa Priyashantha Sep 30 '14 at 14:56
  • Thank you. So I should have been searching for what is a Label instead of what is mainLoop. That's what I needed to know. Considering I've only been using Java for like a couple months there's still a bunch I don't know. If you want to phrase that as an answer I'll mark it. – Will Sep 30 '14 at 14:59
  • 1
    see http://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.7 – Andreas Sep 30 '14 at 14:59

0 Answers0