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

What are the 3 features of a typical seigneurie
The value square root of 53 of lies between which two consecutive integers?
Explain how a species can evolve through natural selection.
What are the 3 features of a typical seigneurie
The height of a rectangular prism with a 20 cm by 12 cm base and a 30 cm diagonal.find the unknown dimension
How did scientists discover the common structure of cells?
The height of a rectangular prism with a 20 cm by 12 cm base and a 30 cm diagonal.find the unknown dimension
How many atoms are in 0.750 moles of zinc?
Alicia estimates that the surface area of a rectangular prism with a length of 11 meters,a width of 5.6 meters,and a height of 7.2 meters is about 334 cubic met
After what happened on April 19 can war between the colonies and Great Britain be avoided?