Тесты
Язык сайта: Русский
Українська
English
Русский
Тесты по программированию
Вход
Регистрация
Тесты по программированию
Теория
сниппеты
Статьи
Главная
Android
Цены
FAQ
История Cosmo
Правила и условия сервиса
Политика конфиденциальности
Политика в отношении файлов cookie
Обратная Связь
loops
:
Язык контента: English
Русский
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(" "); } } }
loops
What is the resut of the following code compilation and execution? public class Main { public static void main(String[] str) { outer: for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { System.out.println("Hello"); continue outer; } System.out.println("outer"); } System.out.println("Good-Bye"); } }
loops
What is the result of the following code compilation and execution? public class Main{ final int x = 1; public static void main(String [] str) { int x = 2; //1 for (x = 3 ; x < 5 ; x++); //2 System.out.println("x=" + x); } }
loops
Here is a code: public static void doIt(String String) { //1 int i = 10; i : for (int k = 0 ; k< 10; k++) { //2 System.out.println( String + i); //3 if( k*k > 10) continue i; //4 } }
loops
What values will variables x and i finally have: public class Main { public static strictfp void main(String...args) { int i = 0; for(double x = 0 ; x != 13.08 ; x += 0.12) { System.out.println(i++); System.out.println(x); } } }
loops
What will the following code print: public class ForLoop { public static void main(String[] args) { for (int i = 0, j = 1; i < 1, j < 2; i++) { System.out.print("i=" + i + "; "); System.out.print("j=" + j + "; "); j++; } } }
loops
How many times will this code print out the line "Test": for (int k = 1; k < 10; k++) { if (k % 2 == 1) continue; System.out.println("Test"); }
loops
What will be the result of compilation and execution of the following code? public class Fuzz{ public static void main(String[] args){ int h = 11; do while(h-->4); while(--h>7); System.out.println(h); } }
loops
← Предыдущая
1
2
3
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты