Westonci.ca connects you with experts who provide insightful answers to your questions. Join us today and start learning! Experience the ease of finding reliable answers to your questions from a vast community of knowledgeable experts. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

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