hulk815 hulk815
  • 03-06-2022
  • Computers and Technology
contestada

Write a java program as follows Write a method called powOfTwo that takes an integer as parameter, computes, and outputs it’s square

Respuesta :

Аноним Аноним
  • 03-06-2022

Answer:

public static int powOfTwo(int input) {

 return input*input;

}

You will have to call this method in main
for printing it, write

System.out.println(powOfTwo(your number));

in public static void main(str[]args) {

}

Ver imagen Аноним
Answer Link

Otras preguntas

Choose all that are correct about the Reconstruction Act of 1867 also known as Radical Reconstruction. A. It divided the south into 5 military districts B. It r
Are fitness evaluation’s design for certain groups of people
Solve the missing elements for each problem. Use 3.14
How did life for African Americans differ from that of whites?
Please answer number 1 I give brainliest thank you!
True or False: After coming to a complete stop, motorists are not permitted to complete a right turn during a presentation of a CIRCULAR RED signal. A left turn
What is the expansion of the following fraction? 1/15 __ A. 0.06 B. 1.15 C. 0.15 _ D. 0.6
i need help on this question
“Pets are either treated too well or too cruelly”. Write a short article that evaluates this statement.
According to the 10th Amendment of the Bill of Rights, powers not specifically delegated are reserved to the people or O A local governments OB the courts Oc po