Тесты
Язык сайта: Русский
Українська
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
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты