Examlex

Solved

What Is Printed

question 26

Multiple Choice

What is printed?

public class Inherit
{

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

abstract class Rectangle extends Figure
{
}

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

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

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


Definitions:

Premises

Premises are statements or propositions that provide the basis for a conclusion in logical reasoning or argumentation.

Indicator Words

Words or phrases that signal the premises or conclusions within an argument, aiding in the identification of logical structure.

Premises

Statements or propositions that are presented as the basis or foundation for a conclusion in logical arguments.

Conclusions

The final part of something, such as an argument or a research paper, summarizing the outcomes or the end results.

Related Questions