Examlex

Solved

What Is Printed

question 60

Multiple Choice

What is printed?

public class Inherit
{

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

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

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

Inherit( )
{
Figure f = new Figure( ) ;
Rectangle r = new Rectangle( ) ;
Box b = new Box( ) ;
f.display( ) ;
f = r;
f.display( ) ;
f = b;
f.display( ) ;
}

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


Definitions:

Labor relations

The field that studies and manages the relationships between employers and their employees, particularly when employees are represented by a union.

Economic conditions

The state of an economy at a given time, including factors like inflation, employment rates, and GDP growth that influence business and labor markets.

Susceptible

Being likely to be influenced or harmed by a particular thing or condition.

Collective bargaining

The process where representatives of workers and employers negotiate over wages, working conditions, and other employment terms.

Related Questions