Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
abstract classes
:
Content language: 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
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes