Skip to main content
1 of 2
Force444
  • 643
  • 2
  • 7
  • 13

Why are nested loops considered bad practice?

My lecturer mentioned today that it was possible to "label" loops in Java so that you could refer to them when dealing with nested loops. So I went home and looked up the feature as I didn't know about it and many places where this feature was explained it was followed by a warning, discouraging nested loops.

I don't really understand why? Is it because it affects the readability of the code? Or is it something more "technical"?

Force444
  • 643
  • 2
  • 7
  • 13