Answer:
public static int powOfTwo(int input) {
return input*input;
}
You will have to call this method in mainfor printing it, write
System.out.println(powOfTwo(your number));
in public static void main(str[]args) {}
1.6m questions
2.0m answers