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

is copper a liquid, solid, or gas when it's room temperature?
If the number in the numerator of a unit rate is one what does this indicate about the equivalent unit rate
A frying pan has a radius of 14 centimeters. What is the circumference of the frying pan? Use 22/7. Please Help!!! A) 64cm. B) 88cm. C) 96cm. D) 128cm.
In "I am Land. I Wait.." the speaker is..? an Italian woman an angry environmentalist some binoculars the land
If there is a 10% chance of sun tomorrow and a 20% chance of wind and no sun, what is the probability that it is windy, given that it is not sunny? Round your a
what is 0.2% as a decimal and a fraction
What are constitutionally guaranteed protections against the abuse of government power? civil rights civil liberties precedents executive orders amendments
what is the subject Be sure to lock the door before going to band practice a band b practice c door d (you)
What steps did the Cherokee take to try to resist removal, and what was the result?
As steel replaced iron, people also began looking for new fuels. Which of the following fuels became popular in the late nineteenth century? A. wood B. petroleu