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

If you are writing a persuasive essay in favor of banning vending machines in schools, which is a counterargument you might anticipate?
Which two numbers have a difference of 5 and a product of 3.36???
Which two numbers have a difference of 5 and a product of 3.36???
which city was located nearest the nile river delta
what other areas beside egypt did the new kingdom pharoahs conquer
Which two numbers have a difference of 5 and a product of 3.36???
what other areas beside egypt did the new kingdom pharoahs conquer
what other areas beside egypt did the new kingdom pharoahs conquer
which city was located nearest the nile river delta
what other areas beside egypt did the new kingdom pharoahs conquer