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

Catharine Beecher and Sarah Hale worked for __________________. a. rights of the accused c. improved labor conditions b. women’s education d. all of the above
To use proteins for energy, the amine group is removed from an amino acid. what is this process called
I need help ASAP please
Which aspect of culture tends to decrease rates of conformity?
which igneous rock has a vesicular texture and a felsic composition
Organisms are made up of one or more
How was Rita Skeeter collecting information from Harry?
How much a year is 15 dollars an hour?
Which research question would be most appropriate for a four- to five-page research paper?
Two hundred tickets are being sold for a schools draws. What are your chance of winning with one ticket. Express your answer in a percent