Тесты
Язык сайта: Русский
Українська
English
Русский
Тесты по программированию
Вход
Регистрация
Тесты по программированию
Теория
сниппеты
Статьи
Главная
Android
Цены
FAQ
История Cosmo
Правила и условия сервиса
Политика конфиденциальности
Политика в отношении файлов cookie
Обратная Связь
anonymous classes
:
Язык контента: English
Русский
What will be the output of the program? public class Test { public static void main(String[] args) { for (int i = 0; i < 3; i++) { i = doIt(i); } } static int doIt(int i) { new Test() { { System.out.print((i + 0.99) + ", "); } }; return i; } }
anonymous classes
What will be the result of compiling and running the following code: public final class QTest { public static void main(String[] args) { new QTest() { public void show() { System.out.print("2"); } }.show(); } public void show() { System.out.print("1"); } }
anonymous classes
What class files will be created during the compilation of the following code? public class Count { class A { } public static void main(String[] args) { Object obj = new Object() { { System.out.println(this); } }; } } class Count$1 { }
anonymous classes
What will be the result of compilation and execution of the following code? public class TestClass { public static void main(String[] args) { String s = new String(){ public String toString(){ return "new method"; } } System.out.println(s); } }
anonymous classes
← Предыдущая
1
Следующая →
Зарегистрируйся сейчас
или
Подпишись на будущие тесты