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

Most men failed the civil service test given by the Han dynasty. If a young mad could not pass what could he do
Describe what happened to the German mark from 1919-1923.
Cellular respiration occurs in: a. animals only b. animals and plants c. plants only d. bacteria only
Which event happened after the Ottoman conquest of Constantinople? A. The founding of the Byzantine Empire B. The fall of the Roman Empire C. The birt
What is the definition for “cadence”?
At the beach what kind of phrase is this A. adjective phrase B. adverb phrase C. appositive phrase
Which of the following cycles is crucial to living organisms? a. phosphorus b. water c. carbon d. all of the above
What were the risks of the Philippine-American war?
Following the Neolithic Revolution, a group of people formed a farming community along the Yellow River. Which of the following would most likely be true for th
How can you show 55 in 3 different ways using 10s and 1's