Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
assert keyword
:
Мова контенту: English
Русский
The following class was launched with a -ea key. What is the result of following code execution? public class Test { public static void main(String [] args) { Boolean b = true; int i = 10; String str = "Hello World"; assert (b == true) : "true"; assert (i != 10) : "false"; System.out.println(str); } }
assert keyword
What will the following code print out: public class Comparation { public static Boolean assert(boolean bool) { return bool; } public static void main(String[] args) { int i1 = 1; Integer i2 = 1; System.out.println("assert=" + assert(i1 == i2)); } }
assert keyword
Given a program: public class SomeClass { public static void main(String... args) { Boolean b = true; assert(!b) : "yo "; System.out.println("hi"); } } and a command line to start: java SomeClass What will be the result?
assert keyword
← Попередня
1
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести