Тести
Мова сайту: Українська
Українська
English
Русский
Тести з програмування
Вхід
Реєстрація
Тести з програмування
Теорія
Сніпети
Статті
Головна
Android
Ціни
FAQ
Історія Cosmo
Правила та умови сервісу
Політика конфіденційності
Політика щодо файлів cookie
Зворотній Зв’язок
abstract classes
:
Мова контенту: English
Русский
Is it possible to use abstract and final modifiers during a class declaration at the same time?
abstract classes
What will happen after the following code is compiled and executed? abstract public class Parent { String s = "hello!"; public void test() { System.out.println(s); } } class P { public static void main(String[] args) { Parent p = new Parent(); p.test(); } }
abstract classes
What is the result of the following code execution? abstract class Test{ private static int getHalf(int i){ return i/2; } public static void main(String[] str){ int half=getHalf(0); System.out.println("Result is:"+half); } }
abstract classes
Which line will the first compilation error occur in? public class Test { /* 1 */ public final static class A {} /* 2 */ static private class B {} /* 3 */ abstract static class C {} /* 4 */ static final private class D {} /* 5 */ final public abstract class E {} /* 6 */ static final abstract class F {} }
abstract classes
Will the following code compile? public abstract class One { public abstract int doJob(); } class Two extends One { }
abstract classes
← Попередня
1
Наступна →
Зареєструйся Зараз
або
Підпишись на майбутні тести