Creation of a recursive method should include defining a method and then calling the method within itself. For example:

public static int          powersOfThree(int n){
     if (n = = 0){
          return 1;
               }
     else {
          return 3* powers OfThree(n-1);
          }
}