Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
ternary-operator
:
Мова контенту: English
Русский
What will be printed out if the following code is compiled and executed? public class Main { public static void main(String s[]) { System.out.println(true ? false : true == true ? false : true); } }
ternary-operator
What is the result of the following code execution? 1: class Foo { 2: public static void main(String[] args) { 3: Integer i = 42; 4: String s = (i < 40) ? "life" : (i > 50) ? "universe" : "everything"; 5: System.out.print(s); 6: } 7: }
ternary-operator
byte x = 0; byte y = (--x<0) ? ++x : -x; System.out.println(y); Result of the code execution will be:
ternary-operator
What will be the result of compiling and running the following code? public class MyFirst { static public void main(String[] args) { //1 int a = 5; a = a!=0 ? a>1 ? a>>2 : a<<2 : a<1 ? a<<2 : a>>2; //2 System.out.println(a); } }
ternary-operator
← Попередня
1
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести