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

hich function would be used to remove a section of text from a document?
Identify the precipitate in this reaction: calcium nitrate reacts with sodium phosphate.
Which of these is a major source of organic compounds? petroleum coal natural gas all of these
A player shoots a basketball from a height of 6 feet. The equation, h = -16t 2 + 25t + 6, gives the height, h , of the basketball after t seconds. Describe the
70/x = 15/21 solve proportion
Find the value of z.
If a catcher catches a 0.5 kg baseball moving at 17.1 m/s in his glove, what is the average force in newtons on the glove during the catch if it takes 0.1 secon
what were most tools made of during the paleolithic era
Typical fatty acids cannot be converted to glucose because ______________.
According to the law of conservation of mass in a chemical reaction the total starting mass of all the reactants equals the total final mass of all the products