Examlex

Solved

What Is Printed? Public Class Inherit

question 2

Multiple Choice

What is printed?

public class Inherit
{

abstract class Figure
{
void display( )
{
System.out.println("Figure") ;
}
}

class Line extends Figure
{
void display( )
{
System.out.println("Line") ;
}
}

void tryme(Figure f)
{
f.display( ) ;
}

Inherit( )
{
Figure f = new Line( ) ;
tryme(f) ;
}

public static void main(String[ ] args)
{
new Inherit( ) ;
}
}


Definitions:

Plumbing Problems

Issues related to the systems that convey water in a building for heating, cleaning, and drinking, along with the removal of waterborne wastes.

Creditor

An individual or entity to whom money is owed by another party, known as the debtor.

Mortgage

A legal agreement by which a bank or creditor lends money at interest in exchange for taking title of the debtor's property, with the condition that the conveyance of title becomes void upon the payment of the debt.

Debtor

An entity or person that owes money to another party.

Related Questions