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

Both the birth and death rates are per _____ individuals. a. 1 000 b. 1 000 000
Which is the main light-absorbing pigment for photosynthesis? carotene chlorophyll hemoglobin anthocyanin User: Which is an example of why the process of photos
What is the formula of sulfurous acid? H2S HSO4 H2SO4 H2SO3
Your_ reflects your talents, abilities , and education
To continue a sequence in adjacent cells, such as months of the year, use the ____ feature of Excel.
y does a wolf need 2 eat many rabbits 2 survive?
According to Freud, a person’s current perceptions and thoughts would be located at the __________ level. a. conscious b. nonconscious c. unconscious d. precons
(x - 4)2 = 36 Which of the following expressions represents the solutions to the given equation?
3x + 5y = 7 4x + 3y = 2 Both x and y have to be the same numbers!
a hockey season ticket holder pays $72.48 for her tickets plus $6.00 for a program each game. A second person pays $18.08 for a ticket to every game, but doesn'