one if statement returns none : one if statement should return a string, however it turns out none. 

I have tried to set a String variable output to store the expected string in the if statement.

public static String starString(int n){
    
    if(n<0){
       String output = "";
       return output = "IllegalArgumentException";
    }else{
        String stars = "";
        for(int i = 0; i < Math.pow(2, n); i++){
            stars += "*";
        }
          return stars;
    }
}

I expect starString(-1)
exp. exception:IllegalArgumentException

the error message: none