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

Calculate the number of oxygen atoms in 2.00 moles of Mn2O7
How many words are in the Pledge of Allegiance? a. 31 b. 22 c. 29
d = √[( x₂ - x₁) + (y₂ - y₁)] Midpoint Formula Slope Form Distance Formula Quadratic Formula
Which geological features did Sally Ride observe from orbit?
The winter-ravaged troops at Valley Forge, suffering from cold, hunger, and disease, participated in many forms of entertainment to keep up morale. What was a
Whats is the definition of Parallel Circuit
The Scopes Trial was about: a. Freedom of the press b. Teaching evolution in school c. Prayer in school
This US national park covers 270 square miles, and 95% of it is underwater. Divers and snorkelers explore its shipwrecks and a bright coral reef, home to reef
How many words are in the Pledge of Allegiance? a. 31 b. 22 c. 29
i am having trouble on a math problem for over the summer Use the distributive property to express the sum of 48+84 as a multiple of 2 numbers with no common fa