Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
numbers
:
Мова контенту: English
Русский
Which of the following lines will compile without errors and warnings?
numbers
What will be printed out to console? public class A { public static void main(String[] sr) { int a = 010; System.out.println(a); } }
numbers
What is the result of the following code compilation? class A { public void m(Number n) { n = 5 / 3; System.out.println("class A, method m : " + n); } } class B extends A { public void m(Double d) { d = d / 3; System.out.println("class B, method m : " + d); } } public class MainClass { public static void main(String args[]) { A a = new B(); a.m(5.0); } }
numbers
Which of these lines contains a valid code: public class Test { public static void main(String[] sr) { int x, y, z; x = 1; y = 2; z = 3; System.out.println(z >= y >= x); //1 System.out.println(z >= y && y >= x); //2 } }
numbers
That will the following code display on the screen: class Main { public static void main(String[] args) { int i = 0; System.out.println(++i == i++); System.out.println(i++ == i++); } }
numbers
What will be printed as a result of the following code execution? public class Main { public static void main(String args[]) { byte b = 0; while (++b > 0); System.out.println(b); } }
numbers
What will be printed to console during the following expression calculation? int x = 0; System.out.print(++x==x++);
numbers
What is the result of the following code execution? Integer i = 5000; System.out.println(i.hashCode());
numbers
What will be the result of the following code compilation and execution? public class Test { public static void main(String[] args) { byte a = 3; short b = 4; compute(a, b); } public static void compute(short x, short y) { System.out.println("Short: " + (x + y) + (x + y)); } }
numbers
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); } }
numbers
← Попередня
1
2
3
4
5
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести