Buscar
🇪🇸
MEM
O
RY
.COM
4.37.48
Invitado
Iniciar sesión
Página de inicio
0
0
0
0
0
Crear curso
Cursos
Último juego
Panel
Notificaciones
Clases
Carpetas
Exámenes
Exámenes personalizados
Ayuda
Marcador
Tienda
Premios
Amigos
Asignaturas
Modo oscuro
Identificador de usuario: 999999
Versión: 4.37.48
www.memory.es
Estás en modo de exploración. debe iniciar sesión para usar
MEM
O
RY
Inicia sesión para empezar
Index
»
Java Interview
»
Chapter 1
»
Loops
level: Loops
Questions and Answers List
level questions: Loops
Question
Answer
Break Statements breaks out of the inner most loop (can define loops using labels "outer: for(,,,) break outer;
Break
Continue Statements skips rest of the statements in inner most loop (can define loops using labels "outer: for(,,,) break outer;
Continue
Do while is used when its not clear how many times loop has to be executed. Code in do whole is executed alteast once.
Do while
For Loop: need to specify the loop bounds( minimum or maximum). For each: do not need to specify the loop bounds minimum or maximum. It repeats statements for each element in an array or an object collection.
For loop vs For Each*
While is used when it is not clear how many times loop has to be executed.Depending on the condition, code in while might not be executed at all
While loop