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

What is the best definition of the term “cottage industry”? a group of cottages that serves as a factory a group or community that starts an industry together p
six friends share 2 pizzas equally how much of a pizza does each friend get
Why did the United States become involved in the Philippines’ affairs? to help establish a democracy in preparation for independence to fight the Spanish-Americ
six friends share 2 pizzas equally how much of a pizza does each friend get
write .06 as a fraction in simplest form
solve inequality and graph 3<-5n+2n
Which geographical feature separates two ecozones? Choose all that apply. Forest x Ocean Lake River (I choose ocean but idk another one)
name the blood vessels that carry blood to and from the lungs
$970 at 4 1/4% simple interest for 2 years
What is the name of the process in which an organism makes a new organism? A. mutation B. fertilization C. variation D. reproduction