The idea is you input a number and a recursive function will return a square of the entered number.

Example:

Enter a number: 5
Square of 5 is 25

The input and display is all figured out, but I can't solve the recursive function itself. It gives me StackOverflow error at line 15, which is return (N * squareOf(N));

Code:
public static int squareOf(int N){
    if(N == 0){
...