Westonci.ca offers fast, accurate answers to your questions. Join our community and get the insights you need now. Experience the convenience of getting reliable answers to your questions from a vast network of knowledgeable experts. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

Write a java program as follows Write a method called powOfTwo that takes an integer as parameter, computes, and outputs it’s square

Sagot :

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) {

}

View image Аноним