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 stage of the scientific process enables a scientist to check the work of other scientists?
Edgar Allan Poe is most famous for writing in which style of literature? A. Gothic B. Science fiction C. Fantasy D. Magical realism
In 100 words or less, explain how Sanger Rainsford’s epiphany is caused by the external conflicts in “The Most Dangerous Game.”
is it possible to multiply a 3 by 4 matrix and a 2 by 2 matrix
Two substance useful because of their viscosity
what two things was Douglass deprived of as a child that is almost like two things every child should have?
What did Douglass's autobiography gain, when it was first published, by having a preface written by William Lloyd Garrison? A. the opinions of a former sla
What is the coefficient for 6g-h
Please help click on the image below
what is matter? explain and give example