Write a recursive method to meet this specification: public static boolean bears
ID: 3768812 • Letter: W
Question
Write a recursive method to meet this specification:
public static boolean bears(int n)
// Postcondition: A true return value means that it is possible
// to win the bear game by starting with n bears. A false return
// value means that
// it is not possible to win the bear game by starting with n // bears.
// Examples:
// bear(250) is true (as shown above)
// bear(42) is true
// bear(84) is true
// bear(53) is false
// bear(41) is false
Hint: To test whether n is even, use the expression ((n % 2) == 0).