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

A scale drawing of a kitchen is shown below. The scale is 1 : 20. Show your work to determine the area of the room in square feet. SHOW YOUR WORK AND I WILL MAR
Find each quotient. 1) 6 ÷ -12) -4 ÷ - 1 3) 2 ÷ - 1 4) 20 ÷ -5 5). -8 ÷ -2Need now please
list any two types of organelles. Thank you :D
Do you have to soak dried black eyed peas before cooking?
__________ are boats that are typically used in the rivers of China and the East Indies. A. Junks B. Dinghies C. Bowriders D. Houseboats Please select the best
Which statement about theme is true?A. In poetry, the theme is often directly stated.B. In plays, the character never reveal the theme.C. In novels, the charact
PLEASE HELP!! I WILL MARK THE FIRST CORRECT ANSWER BRAINLIEST!!)) A cylinder has a height of 17 inches and a diameter of 16 inches. What is its volume? Use 3.1
CAN SOMEONE HELP ME PLEASE ASAP!?
I love those guys, so fun! Look over at them playing with dog.
help ....................​