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

9^x=27^(x+2) how do I do that? I don't get how to do it with different bases
what two factors determine the thermal energy in a substance
In what direction does an applied force move an object? A. in the same direction as the force B. independent of the force C. in the opposite direction of th
Near the surface of the earth what is the magnitude and direction of the acceleration due to gravity?
what is 78% of 50 questions
PLEASE HELP I GIVE THANKS
Whose unexpected reaction after one of George Whitefield's sermons demonstrated how powerful Whitefield's preaching style was?
Describe three properties of a frozen fruit bar including its state of matter.
Researchers performing __________ insert a weak electric current into the brain to stimulate it. A. lesioning B. ESB C. EEG
Why are energy pyramids shaped the way that they are?