Solved

Consider the Following Declarations: Public Interface Displayable

Question 9

Multiple Choice

Consider the following declarations: public interface Displayable
{
Void display() ;
}
Public class Picture implements Displayable
{
Private int size;
Public void increaseSize()
{
Size++;
}
Public void decreaseSize()
{
Size--;
}
Public void display()
{
System.out.println(size) ;
}
Public void display(int value)
{
System.out.println(value * size) ;
}
}
What method invocation can be used to complete the code segment below?
Displayable picture = new Picture() ;
Picture._________________;


A) increaseSize()
B) decreaseSize()
C) display()
D) display(5)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions