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

How do you- I cant think t-t help
A. - 3x - 2y = 4 5x - 8y = -1 B. 5x – 8y = -1 - 3x – 2y = 4 1) How can we get System B from System A? Choose
1. Explain what is meant by the 'ring of fire' (2 marks)2. Explain why earthquakes occur along conservative plate boundaries but there is novolcanic activity. (
True or false; "All linear functions have exactly one x-intercept." Explain your thinking
-3x + y = 7 3.x + 2y = 5
Find the slope of the line that passes through the pair of points. (-2,3), (-5,2)
The misuse of public property and some ways of curbing it​
What makes teenagers aged 13-18 years more daring than other adolescents?
WILL MARK BRAINLIEST!!!!!YOU DONT HAVE TO DRAW JUST ANWER THE QUESTION
Suppose the spot ask exchange rate, Sa($|£), is $1.90 = £1.00 and the spot bid exchange rate, Sb($|£), is $1.89 = £1.00. If you were to buy $1,000,000 worth of