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

John Sells Hamburgers For $3 Each and cheeseburgers for $3.50 each. One afternoon, he sells a total of 24 burgers for $79. How Many hamburgers did he sell?
How is the ecological system organized?
Scientists divide rocks into groups based on_________
is 10 yards less than 360 inches
The positive integer x is a multiple of 9 and also a multiple of 12. The smallest possible value of x is (A) 3 (B) 12 (C) 21 (D) 36 (E) 72
The ratio of Sam age to Hanks is 5 to 3. If the sum of their ages is 24, how old is Hank?
Which one of the following is smallest in size ?N3-               O2-               F-                Na
Consider the relation {(–4, 3), (–1, 0), (0, –2), (2, 1), (4, 3)}.Graph the relation.State the domain of the relation.State the range of the relation.Is
Examples of cultural diffusion in ancient Rome pertaining to government
The positive integer x is a multiple of 9 and also a multiple of 12. The smallest possible value of x is (A) 3 (B) 12 (C) 21 (D) 36 (E) 72