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 is 83 divided by 72,628
why did the French diplomats fail to smooth relations between the two countries in 1796
Tessa shot 36 free Throws.she made 27 of them.what fraction of the free throws did she make?
what is the difference between polar and nonpolar bonds
A singer performed 9 songs at a recital. She had 3weeks to practice. How many songs did she practice each week if she practiced an equal number of songs each we
In terms of energy, how would you classify the following chemical reaction? 2Cu + O2 -> 2CuO + 315 kJ a.endothermic b.exothermic c. both endothermic and exo
what the unit rate in 14 hours in 2 weeks
Moneys taken out of a salary for such things as taxes, medical insurance, and retirement funds are called A. exemptions. B. contributions. C. commissions. D
what is the mass of 1 mole of barium acetate
Why were few court cases won against monopolies and trusts during the Gilded Age?