Question: 8. Determine the output of the following Java program consisting of the files: Itype.java, Atype.java, Btype.java and ItypeTest.java. Assume that all files are in the

 8. Determine the output of the following Java program consisting of

8. Determine the output of the following Java program consisting of the files: Itype.java, Atype.java, Btype.java and ItypeTest.java. Assume that all files are in the same directory // Itype.java interface Itype void foo) // Atype.java class Atype implements Itype( public void fooSystem.out.println ("in Atype's foo )"h public String toString)f return "I am an Atype object" ) 77 Btype.java class Btype extends Atype Btype ()System.out.println ("constructing a Btype object"); 1 public void fooSystem.out.println ("in Btype's foo )" public void bar System.out.println ("in Bytpe's bar )") ) public String toString) return "I am a Btype object" ) // ItypeTest.java class ItypeTest public static void main (String[] args) Itype I; Atype A; Btype B; A new Atype ); Bnew Btype ); AB B.bar ) System.out.println (I); System.out.println (A) System.out.println (B)

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!