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. display()b. decreaseSize()c. display(5)d. increaseSize()

Respuesta :

Answer:

a. display()

Explanation:

Based on the scenario being described within the question it can be said that the method invocation for this statement would be display(). This is because the statement,

Displayable picture = new Picture();

Is creating a new Displayable object this object then needs to be called using the . operator and passed the display() method in order for that object to correctly be displayed. Therefore the answer in this question is a. display()