So as of recent I am testing out using methods that return a value, and I keep getting an error stating that I am missing a return statement in my method "basicPoints". I have a return statement, but I'm not sure why it keeps giving me this error, do I need to place the return statement in a different portion of the method?
public class Bridge {
private static int answer;
public static void main(String[] args) {
basicPoints(2, "clubs");
System.out.println("Points equal: " + ans);
}
public static int basicPoints(int level, String suit){
if (suit.equalsIgnoreCase("clubs")){
int ans;
ans = level * 20;
return ans;
}
}
}