- Compilation fails.
- An exception is thrown at runtime.
- "BeginRunEnd" is printed.
- "BeginEndRun" is printed.
- "BeginEnd" is printed.
Answer: Option 3 1. new Derived(); statement executes and invoke the non-parametrized constructor of derived class i.e. public Derived(); 2. As Derived class is a subclass of class Base so super(); executes...
1 Answers 25 viewsAnswer: Option 3 The overriding method can throw any unchecked (runtime) exception, regardless of exception thrown by overridden method. NullPointerException is RuntimeException so compiler will not complain.
1 Answers 1 viewsAnswer: Option 1 The options B, C and D are incorrect options as in Java we can declare an abstract class comprising of abstract and non-abstract methods that will not...
1 Answers 1 viewsAnswer: Option 2 Let'
1 Answers 4 viewsAnswer: Option 1 Let'
1 Answers 140 viewsAnswer: Option 4 Let'
1 Answers 8 viewsAnswer: Option 3 Let'
1 Answers 4 views