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

When did the Constitution change to count enslaved blacks as whole persons? 1790 1868 1920 1870
What is the MAIN responsibility of the President according to the Constitution? * A. To make laws B. To decide if laws are constitutional C. To enforce laws D.
What sentence identifies the theme of the talking skull
How can a root be written using a rational expression?
Jacinto y yo _____ (escribir) correos electrónicos todos los días
1. What is the scientific name for gas?
A service contract for a video projection system costs $195 a year. you expect to use the system for four years. instead of buying the service contract, what wo
What occurs during respiration? sugar is produced oxygen is released energy is released carbon dioxide is used
what is the point in life
what are the building blocks of proteins