Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following class and print the output: abstract class Test1 { static int x; Test1() { System.out.printf(Making objects); } public abstract void restful(int x);

Consider the following class and print the output:

abstract class Test1 { static int x; Test1() { System.out.printf(Making objects); } public abstract void restful(int x); }

public class Test2 extends Test1 { public void restful(int x) { System.out.printf(class Test2); } }

public class Test3 extends Test1 { Test3() { super(); } public void restful(int x) { System.out.printf(class Test3); } }

public class Driver { public static void main(String [] args) { Test2 a1 = new Test1(); Test3 a2 = new Test(); a1.restful(15); a2.restful(20); Test a3 [] = new Test[5]; for(int i=0;i

for(int i=0;i

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

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions