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

The United States has a free trade agreement with:
Jonathan makes a weekly allowance of $25. He also makes $9.50 an hours at his job. Because of his age, Jonathan can work no more than 20 hours per week. a) Writ
The Bible contains three different accounts of Hezekiah's reign.
What is one benefit of a centrally planned economy? a. it allows entreprenuers to function freely b. it produces more food c. it offers lots of incentives fo
What is a predella? a. the sides of a triptych b. a platform on which an altar stands c. a winged triptych d. none of the above
What amendment abolished slavery? Thirteenth Fourteenth Fifteenth Sixteenth
What is the formula for the general term of the arithmetic sequence 1, 5, 9, 13, …?
_____ help fertilize the soil by shedding digestive material
Facial expressions and gestures are examples of _____________ messages. a. Verbal b. Nonverbal c. Intrapersonal d. Interpersonal Please select the best answ
......................................................... is the process through which people use their judgment rather than standardized rules to address probl