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

how do you know if a chemical change has taken place?
What is the meaning of zero in "3 miles below sea level" (we are doing integers)
Which achievement was Giovanni Caboto, also known as John Cabot, known for? A. He reached North America before Columbus but was unable to prove that he had foun
A quarterback completed 68% of his passes in a game. He threw 25 passes. How many passes did the quarterback complete?
identify one benefit of working for the government in Han dynasty.
Describe the three forces thought to move tectonic plates
what subjects other than math that use ratios
how do i solve 7x-y=21
how many different gametes can an RRYy parent form?
Is MgC2 an organic, acid, inorganic compound?