Please take time and answer it correctly and properly.
Posted: Tue Jul 05, 2022 10:27 am
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.
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.