Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
toString method
:
Мова контенту: English
Русский
What will happen when the following code is compiled and executed? 00: package test; 01: public class Test { 02: public static void main(String [] args) { 03: Test test = new Test(); 04: System.out.println(test.toString()); 05: } 06: }
toString method
What is the result of the following program execution? public class A { public static void main(String[] args) { Boolean b1 = true; Boolean b2 = new Boolean("/false"); String s1 = "" + 1 + '+' + 1 + '=' + (1 + 1) + " is "; String s2 = s1 + b1 + '/' + b2; System.out.println(s2); } }
toString method
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 ) ); } }
toString method
← Попередня
1
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести