Assuming that interface Resizable is declared elsewhere, consider the following class declaration:

public class InnerClassExample
{
public static void main(String[] args)
{
class SizeModifier implements Resizable
{
// class methods
}
__________________________ // missing statement
}
}
Which declarations can be used to complete the main method?

Respuesta :

Answer:

The answer is "Resizable something = new SizeModifier();".

Explanation:

In the given code a class "InnerClassExample" is defined, inside the class the main method is declared, in which a class "SizeModifier" is declared, that inherits the interface, that is "Resizable".

  • Inside of the main method, we create an interface object, which is "something", in which the "SizeModifier" class is used to call as an instance or constructor.
  • In this question only answer section code is correct, and others were wrong because it is not declared in the question.
ACCESS MORE