Examlex

Solved

What Is Printed by the Following Code? Consider the Polymorphic

question 8

Multiple Choice

What is printed by the following code? Consider the polymorphic invocation.
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( ) ;
}
}

Understand Herzberg's motivation-hygiene theory and differentiate between motivators and hygiene factors.
Acknowledge the significance of effective time management strategies for personal and professional growth.
Recognize the relevance and application of Mintzberg's managerial roles in conducting business operations efficiently.
Comprehend the stages of business growth and factors leading to business success.

Definitions:

Related Questions