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

Two taps A and B fill a swimming pool together in two hours. Alone, it takes tap A three hours less than B to fill the same pool. How many hours does it take ea
Why were the committees of correspondence powerful?
what is the mRNA sequence from 3 TACGGTAAGCATCTTGGCATAACCCCAATT 5
Why were the committees of correspondence powerful?
how can you write 0.45 as fraction and a percentage ,please show work
How to change 3 7/8 into an improper fraction
one-third of the fish in Liam's fish tank were added today. Half of the other fish were a gift to Liam last week. the other 9 came from Liam's old fish tank.
Which theater is considered Shakespeare's theater? A. The Swan B. The Globe C. The Rose D. The Stage
The Panama Canal connects what two bodies of water?
a antonym for biosphere