Please take time and answer it correctly and properly.
5. a) What is blank or uninitialized final variable? How to initialize blank final variable? b) What is the output of this program? class Base { protected void foo() {} } class Derived extends Base { void foo() {} } public class Main { public static void main(String args[]) { Derived d = new Derived(); d. foo(); } } c) What is the difference between "compile time polymorphism" and "run time polymorphism". Explain clearly with simple code examples.
Please take time and answer it correctly and properly.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am