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

what is the meaning of theropod​
A sector of a circle of radius 6cm subtends an angle in of 105 at the centre of the circle.Calculate I)the length of the minor Ii)Perimeter of the sector Iii)
How do I solve this problem? The trouble that I have is evaluating if 2^∞ or ∞³ is larger?
Common Theme in "Fighter" and "Kitty and Mack"
Which is the function of a thesis statement?
How is the graph of the parent function translated A) left 3 units up 2 units B) right 3 units and down 2 units C) right 3 units and up 2 units D) right 2 u
Which word best completes this analogy
a b Which of the following countries has created special economic zones to reduce government regulations on the economy? A. China B. Japan C. North Korea D. Sou
What poetic device is used to indicate meaning in a character or event in addition to the literal meaning
A runner sprinted for 414 feet. How many yards is this?