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's a common reason for divorce?
can anyone please help 35 points if you can
10) What is 150% of 60?
Identify and list down the hazards using published resources and personal observation. Write your answer in the table below.
Select the correct answer. Choose the CONJUNCTION. Dad fixed the steps, for they were dangerous. OA. steps OB. for O C. were
Congress passed the Selective Services Act and drafted young men for WWI. Identify the causes a) Too many older men signed up to fight in WWI, b) Not enough men
Which element atom will form a LARGER radius when it becomes an ion? Na Mg Al Cl
1.In computing, which key has to be pressed along with the control key to undo an action? 2. What is the natural phenomenon that occurs when precipitation is si
in the adjoining fig ABCD is a square and PQRS is a circle if ab=14cm.find the area of shaded portion
In the phrase "by the benignant influences of the former” (par. 3, bottom of p. 214), benignant most likely means: Benevolent Indifferent Unkind Hostile