Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. What is the output of the following code sequence? package javaapplication123; public class Sup { void who0 {System.out.printin(who in Sup);1 } package javaapplication123; class

image text in transcribed
7. What is the output of the following code sequence? package javaapplication123; public class Sup \{ void who0 \{System.out.printin("who in Sup");1 \} package javaapplication123; class Subl extends Sup \{ void who0 \{ System.out.printin("who0 in Sub1"): \} 1 package javaapplication 123; class Sub2 extends Sup 1 void who0 ( System.out.printin("who0 in Sub2"); ) 1 package javaapplication 123; public class JavaApplication 123 \& public static void main(String II args) f Sup superOb = new SupO; Subl subObl = new Sub10; Sub2 subOb2 = new Sub20; Sup supRef; supRef a superOb; supRef.who0; supRef = subObl supRef.whoO; supRef = subOb2; supRefwho0: 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions