Тести
Мова сайту: Українська
Українська
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
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести