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

Why should an athlete suspected with an internal injury not be given water?
What is a benefit of increased physical fitness
A 95 kg clock initially at rest on a horizontal floor requires a 650 n horizontal force to set it in motion. after the clock is in motion, a horizontal force o
When was Obama born
Share 150 in ratio 4:1
about fifty thousand years ago ______ formed meteor cratera. erosionb. Glaciations c. an earthquaked. an asteroid
energy can make matter a. move b.changec. work d. all of the above
Why did the court choose not to “turn the clock back to 1868” when considering the issue of segregation in public schools?
Read the excerpt below and answer the question. --------- "The child is not dead The child lifts his fists against his mother Who shouts Afrika! shouts the br
Emma spent $23.23 on 2 dozen bagels and a gallon of iced tea. The price of the gallon of iced tea was $5.25. The following equation can be used to find d, the p