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

Help. I need to know the length of ac
Which of the following types of rock would most likely contain a fossil? slate granite lava rock limestone
Alex buys a home for $276,400. His home is predicted to increase in value 3.5% each year. What is the predicted value of Alex’s home in 25 years? A. 621,357 B
What does Munich’s refer to in the 13 days?
Which of the following scenarios best shows the relationship between personal and civic responsibility? Tara stays home on Friday night to babysit her sister i
Which of the following statements about archaea and bacteria is true? A. Neither is single-celled. B. They both have nuclear membranes. C. Neither reproduces by
solve the system of equations. 2x-2y=-4 and x+y=8. PLEASE SHOW WORK
Please help!!!! A group of students is studying convection currents. They fill two identical balloons with the same amount of helium. One balloon is placed in a
Solve the following |x-7|=-20
HURRY 20 MINS LEFT!! All the animals were now present except Moses, the tame raven, who slept on a perch behind the back door. When Major saw that they had all