Тести
Мова сайту: Українська
Українська
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
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести