Тесты
Язык сайта: Русский
Українська
English
Русский
Тесты по программированию
Вход
Регистрация
Тесты по программированию
Теория
сниппеты
Статьи
Главная
Android
Цены
FAQ
История Cosmo
Правила и условия сервиса
Политика конфиденциальности
Политика в отношении файлов cookie
Обратная Связь
if statement
:
Язык контента: English
Русский
What is the result of the following program compilation and execution? public class Test { public static void main(String[] args) { int i = 1; long j = 1; if (i == 1) { int k = 1; if (i == k) { System.out.println("i equals k"); } } else if (j == k) { System.out.println("j equals k"); } } }
if statement
What will be the result of compiling and running the following code? public class IfElseTest { public static void main(String...args) { boolean b = false; if (b == false) if (b = false) System.out.println("if statement"); else System.out.println("else statement"); } }
if statement
What will be printed as a result of compiling and running the following code? public class Test { private static Boolean b1, b2; public static void main (String[] args) { if (b1 || !b2 || !b1 || b2) { System.out.println(true); } else { System.out.println(false); } } }
if statement
What will be the output of the following code? class Main { public static void main(String[] args) { Boolean b1 = true; boolean b2 = false; boolean b3 = true; if ((b1 & b2) | (b2 & b3) & b3) System.out.print("alpha "); if((b1 = false) | (b1 & b3) | (b1 | b2)) System.out.print("beta "); } }
if statement
What will be the result of compilation and execution of the following code? public class Main { static int a, b; public static void main(String[] args) { if (!(++a==0 && ++b==0)) System.out.print("true a+b="); else System.out.print("false a+b="); System.out.print(a + b); } }
if statement
← Предыдущая
1
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты