Assume that the following method header is for a method in class A. public void displayValue(int value) Assume that the following code segments appear in another method, also in class A. Which contains a legal call to the displayValue method?

Respuesta :

Answer:

int number = 100;

displayValue(number);

Explanation:

In order to call the method, we need to write its name and pass the parameters, if it has any.

The method public void displayValue(int value) takes one parameter, an integer value. Firstly, we need to initialize the value and, then call the method with that value as seen below.

int number = 100;

displayValue(number);