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

A microscope is set so it makes an object appear 4 x 10`2 times larger than its actual size. A virus has a diameter of of 2 x 10`-7 meter. how large will the di
How did the aboriginals people heal themselves before Europeans arrives?
Which is a solution to the equation y=5x-6
Did Maya Angelou's uncle kill the mom's boyfriend after finding out he raped Maya or beat him to death?
How do you find the length of a circle in geometry?
What positive and negative traits does Odysseus demonstrate in his adventure with the Cyclop's?
Ryker is given the graph of the function y= 1/2x^2 - 4 . He wants to find the zeros of the function but is unable to read them exactly from the graph. Find the
which geographic feature most aided england during the industrial revolution?
An ecosystem includes what?
Acme Inc. spent $870 less on postage than on supplies. The ratio of postage costs to supply costs was 2 to 5. How much did Acme spend on postage? Solve this pro