Тесты
Язык сайта: Русский
Українська
English
Русский
Тесты по программированию
Вход
Регистрация
Тесты по программированию
Теория
сниппеты
Статьи
Главная
Android
Цены
FAQ
История Cosmo
Правила и условия сервиса
Политика конфиденциальности
Политика в отношении файлов cookie
Обратная Связь
break statement
:
Язык контента: English
Русский
What is the result of the following code compilation and execution? switch(10) { case 1: System.out.println("1"); break; case 2: System.out.println("2"); break; default: break; System.out.println("default"); }
break statement
What will be the value of the variable count after executing of this code? int count = 1, i = 0; do { count *= ++i; if (count > 5) break; } while (i <= 4);
break statement
What will be the result of the program? public class MyTest { public static void main(String[] args) { label1: for (int i = 0; i < 3; i++) { if (i == 1) continue label1; label2: System.out.print("TEST "); label3:; } } }
break statement
What happens at compilation and ruing of this piece of code? int i = 0, j = 5; tp: for (;;) { i++; for (;;) { if (i > --j) { break tp; } } System.out.println("i =" + i + ", j = " + j); }
break statement
What is the result of the following program: public class Foo { public static void main(String[] args) { for (int k = 1; k <= 10; k++) { if (k % 5 == 0) break label; System.out.print(k + " "); } label: { System.out.print("stop!"); } } }
break statement
What is the result of the following program execution? public class Bar { public static void main(String args[]) { label: for (int i = 0; i < 5; ++i) { for (int j = 0; j < 5; ++j) { if (i > 2) break label; System.out.print(j); } System.out.print(" "); } } }
break statement
Break statement
break statement
Break statement
break statement
← Предыдущая
1
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты