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

Which is a short-term effect of nicotine? A. Reduced heart rate B. Decreased mucus and saliva production C. Increased blood pressure D. Decreased bowel activ
What is the oxidation number of Cl in chlorate ion ClO3?
what percent of 51 is 127.5?
Which of the following is not an oxidation-reduction reaction? A. Ca + 2 HCl ---> CaCl2 + H2 B. H2 + Cl2 ---> 2 HCl C. NaCl + LiNO3 ---> NaNO3
the military understanding reached by great britain, france, and russia is called:
a seismograph station can determine its distance from an earthquakes epicenter by
f(x)=tan(x) Find the limit as x approaches pi/2 from the negative and positive sides then find the limit as x approaches 0.
Sudanese violence against non-Arab peoples in the western province of Darfur has introduced the world to the term Janjaweed. What does this term translate to in
a ph of _____ is considered neutral.
Positive life decisions are usually based on __________. A. your latest interest B. good mental and emotional health C. suggestions by friends D. short-term