Тесты
Язык сайта: Русский
Українська
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
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты