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 are the two prepositions?
What are the top five causes of death in the United States
What is the mass, in grams, of 28.64 ml of acetone?
The explosive chemical nitroglycerine is also a drug given to dilate the blood vessels of patients suffering from arteriosclerosis. Which of the following effec
In triangle ABC, c = 8, b = 6, and ∠C = 60°. sin∠B = _____
How is there snow on mt everest if it's above the clouds?
A missing fraction on a number line is located exactly halfway between 3/6 and 5/6 . What is the missing fraction
Can someone please translate this sentence for me to Spanish? Please don't use Google Translate! Thanks! :) - In the clothing store, I really like the service o
Why is the number of cold snowy days and the amount of hot chocolate sold at ski resort correlation
Which muscle group has the largest increase in circumference when contracted? Why do you think this occurred?