Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
primitive types
:
Мова контенту: English
Русский
Which of the following options are correct?
primitive types
Will the code compile? If so, what will be the result of its implementation? public class Autoboxing { public static void main(String[] args) { Integer oInt1 = null; Integer oInt2 = 0; final int int1 = oInt1; final int int2 = oInt2; System.out.println(int1 == int2); } }
primitive types
As a result of compiling of which lines there will be a compilation error: public class Main { public static void main(String[] args) { int v1 = 081; //1 int v2 = 0x81; //2 float v3 = 0x81; //3 float v4 = 0.81; //4 byte v5 = 0x81; //5 } }
primitive types
What will be the result of the following code execution? public class Main { public static void main(String[] args) { byte b = 12; byte k = b + 1; System.out.println(k); } }
primitive types
1. int x = 10; 2. do { 3. x--; 4. } while(x < 10); How many times will the line 3 be executed?
primitive types
Variable of "char" type can store values from the following range
primitive types
Select all the statements that are correct regarding the following code: public class TestClazz { public static void main(String[] args) { final long Byte = 0; // 1 if ( Byte.equals(0) ) { // 2 System.out.print("=="); } else { System.out.print("!="); } } }
primitive types
Given the program fragment: double p = Double.POSITIVE_INFINITY; double n = Double.NEGATIVE_INFINITY; System.out.println( ((long) p > (long) n) + " " + ((int) p > (int) n) + " " + ((short) p > (short) n) + " " + ((char) p > (char) n) + " " + ((byte) p > (byte) n)); What will be printed when this code is executed?
primitive types
Which of the next lines compile without an error?
primitive types
What will be printed if you compile and run the following code: public class Quizful { public static void main(String[] args) { byte b = 127; b += 129; System.out.println(b); } }
primitive types
← Попередня
1
2
3
4
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести