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

Help with question 3
Dante was inspired by the writing of the classical Roman poets _______________, _______________, and _______________.
Ammonia at 10◦c with a mass of 10 kg is in a piston/cylinder assembly with an initial volume of 1 m3. the piston initially resting on the stops has a mass such
Consuming five or more drinks in a row for men, and four in a row for women, is known as ____.
What type of evidence is Winston Churchill's Iron Curtain speech?
3×4 10×10+10/2-6×4Please help me as soon as possible
Genetically-modified organisms (GMOs) have included corn crops engineered to produce a natural pesticide to kill a certain insect which would normally destroy t
How did the Indus Valley civilization end?
The quotient of a number and -2
Solve this quadratic formula -3x^2 +16 +12