I have shown the full class here in case there is something i need to specifically change. I am wanting to call the "power" method in the main method as you can see in the code but it will not work because one of the methods are static and the other one is not. Doe anyone know of a way around this problem? All help appreciated!

```
public class Power
{
    public  int square(int x){
        return x*x;
    }

    public int cube(int x){
        return power(x, 3);
    }

    public int hypercube(int x){
        return power(x, 4);
    }

    public  int power(int x, int n)
    {
        if (n==1)
           System.out.println(n);

        if (n==2)
            square(x);

        if (n==3)
            cube(x);

        if (n==4)
            hypercube(x);
    }

    public static void main(String[] args)
    {
        int x = 6;

        Power p = new Power();

        System.out.println( "The square of " + x + " is: " + power( x, 2 ) );

        System.out.println( "The cube of " + x + " is: " + power( x, 3 ) );

        System.out.println( "The hypercube of " + x +" is: " + power(x, 4));
    }
}

```

edit:
I have made the changes but i am getting a Stackoverflow error on lines 15, 26 and 34. here is the changed code.

```
public class Power{

    public static int square(int x){
        return x*x;
    }

    public static  int cube(int x){
        return power(x, 3);
    }

    public static int hypercube(int x){
        return power(x, 4);
    }

    public static int power(int x, int n){
        if (n==1){
            System.out.println(n);
        }

        if (n==2){
            square(x);
        }
        if (n==3){
            cube(x);
        }
        if (n==4){
            hypercube(x);
        }
        return x;

    }

    public static void main(String[] args){
        int x = 6;

        System.out.println( "The square of " + x +
                " is: " + power( x, 2 ) );

        System.out.println( "The cube of " + x +
                " is: " + power( x, 3 ) );

        System.out.println( "The hypercube of " + x +
                " is: " + power( x, 4 ) );
    }    
}

```

line 15 is:

```
return power(x, 3);

```

line 26 is:

```
if (n==1){

```

line 34 is:

```
cube(x);

```