Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
booleans
:
Мова контенту: English
Русский
What will be the output of the program import java.util.Formatter; public class Formatting { public static void main(String[] args) { Formatter formatter = new Formatter(); System.out.println( formatter.format("%b %b %b %b %b", true, null, "false", new Boolean("false"), 0) ); } }
booleans
What will be the output of the following code? class Main { public static void main(String[] args) { Boolean b1 = true; boolean b2 = false; boolean b3 = true; if ((b1 & b2) | (b2 & b3) & b3) System.out.print("alpha "); if((b1 = false) | (b1 & b3) | (b1 | b2)) System.out.print("beta "); } }
booleans
What will be the result of compilation and running the following code: import java.util.Formatter; public class Formating { static Formatter formatter = new Formatter(); public static void main(String[] args) { System.out.print( formatter.format("%b %b %b", new Boolean(null), new Boolean("bool"), 8 ) ); } }
booleans
What will be the output of the following code? public class Test { int i = 10; public int hashCode() { return i; } public static void main(String ... a) { System.out.println(String.format(" %1$b ", new Boolean("fAlSe")) ); System.out.println(String.format(" %1$H %2$s", new Test(), null ) ); } }
booleans
← Попередня
1
2
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести