Welcome to Westonci.ca, where you can find answers to all your questions from a community of experienced professionals. Join our platform to connect with experts ready to provide detailed answers to your questions in various areas. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

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 Аноним