Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
operators
:
Мова контенту: English
Русский
What is the result of the following code compilation and execution? public class Test1 { public static void main(String[] args) { int i = 1; i <<= 1; float f = 1; f = f << 1; System.out.println( i + ", " + f); } }
operators
What will be displyed after the following code is executed? int x = 0; System.out.print(x++==++x);
operators
What is the result of the following code execution? public class Main { public static void main(String[] args) { int var = 1; System.out.println("The variable var (post-increment): " + var++); System.out.println("The variable var (pre-increment): " + ++var); //1 int var1 = 1; int var2 = 1; if (var1++ == ++var2) //2 System.out.println("The variables are equal"); else System.out.println("The variables are not equal"); } }
operators
What will be the result of the following code execution? public class StartClass { public static void main(String[] args) { Double d1 = 1d; Double d2 = 1d; System.out.println(d1 == d2); } }
operators
What will the following code print out? public class Main { public static void main(String[] args) { recur(99); } public static void recur(int a) { if (a <= 100) { System.out.println("a=" + a); recur(++a); System.out.println("a=" + a); } } }
operators
What is the following code execution result? public static void main(String args[]) { int a = 1; int b = a++; int c = -a; System.out.print(a); System.out.print(b); System.out.print(c); }
operators
What will be printed out to console as a result of the following code execution? public class Clazz { public static void main(String[] args) { int a = 0; System.out.println("a=" + new Integer(a = 1)); } }
operators
Which line/lines contain an error? int i = 1; //1 i = -+(10 + 2 + i); //2 ++i--; //3 System.out.println(i);
operators
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: }
operators
What will be printed to console after the following code is compiled and executed? public class Main { public static void main(String s[]) { System.out.println(4|3); } }
operators
← Попередня
1
2
3
4
5
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести