Question: Based on the following Java code, answer the questions ( 2 0 points ) : a ) Write code in the following section to demonstrate

Based on the following Java code, answer the questions (20 points): a) Write code in the following section to demonstrate how to implement static polymorphic and dynamic polymorphic variables. b) Based on your code decide: temp: static polymorphic variable OR dynamic polymorphic variable year: static polymorphic variable OR dynamic polymorphic variable class Sample{(public void outpoutInf (){ System.out.println ("Super class"); }} class Demo extends Sample { public void outputInf () System.out.println (" Sub class ") ; }}class Test { public static void main ( String [] args ){Sample temp;Demo year ; // write the code to demonstrate how to implement dynamic polymorphic variable // write the code to demonstrate how to implement static polymorphic variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!