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

Slope line passing (-4,-7) and (-2,-3)
12345 secret code in english​
Please help me with the question i have put
The function h is defined by h(x)=3x^(2 )+2. Find h(4x)
What is a use of an exothermic reaction?
What do muckrakers do? Option:: a. set political agendas b. uncover abuses in government c. set political policies d. serve as gatekeepers
At which angle will the hexagon rotate onto itself?A. 60°B. 90°C. 120°D. 180°
“an inconvenient truth” summarized with key figures please
In the diagram below, the number in each box is the sum of the two numbers below it work out the missing numbers for boxes A,B and C Pls Answer them all
What is the molarity of a 3.0 L solution that contains 0.45 moles of solute? A. 0.15 M B. 15M C. 6.7M D. 140M E. 0.45M