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

Kimberlee feels distressed when she sees poverty. to reduce her own feeling of distress, she works tirelessly in a homeless shelter to help those who are not as
criminal law is best described as laws that
In which province is welkom
What is the term that describes the pattern or base pairing in dna?
The early state of __________ gave rise to the modern state of ethiopia.
(02.02)Pat paid $85.50 for renting a scooter for 6 hours. What was the rate per hour for renting the scooter? (Input only numeric values and decimal point, and
Which choice gives a reason that property rights must be protected in a market economy? a.the right to property is not guaranteed in command economies. b.in a c
An early school of psychology used introspection to study the basic elements of mental experiences. this school of psychology was called
A _______ is a set of characters that uses the same typeface.
The movement of h+ ions into the stomach (represented above) is accomplished through: