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

WILL MARK BRANLIEST!!!! PLZ HELP!! Why must farmers in the western states of the Midwest irrigate? a. humid b. tropical c. dry d. wet
pls help assap easy if 50x=70 what is x
Solve for g E = 32 g h
Which is a major theme of The Importance of Being Earnest? A. Marriage is not to be trifled with. B. Class status hinders personal freedom. C. Real love is a
i need help i dont know what im doing
Can you help me with this question?
who did england passed the navigation act to ?
A 96 mile trip required 6 gallons of gasoline. At the rate, how many gallons would be required on a 160-mile trip?
how do you do #3? if you can please take a picture or just explain the process, not just the answer. (i don’t need a super detailed explanation it’s just it was
First correct answer gets Brainliest!!!!!!! f(x) = -3x^2 + 2x - 7 Find f(-1)