Community
Participate
Working Groups
Create a class sucha as the following: <code> public class Hand implements Comparable<Hand> { private Rank rank; public static enum Rank { LOW("low"), HIGH_CARD("high card"), ONE_PAIR("pair"), TWO_PAIR("two pair"), THREE_OF_A_KIND("three of a kind"), STRAIGHT("straight"), FLUSH("flush"), FULL_HOUSE("full house"), FOUR_OF_A_KIND("four of a kind"), STRAIGHT_FLUSH("straight flush"); public String name; private Rank(final String name) { this.name = name; } public String toString() { return name; } } }</code> Eclipse will complain that Rank cannot be resolved. No errors are reported for the Rank declaration and the code compiles from the command line.
Remove implements Comparable<Hand> from the declaration to verify.
Works for me in latest. *** This bug has been marked as a duplicate of 76880 ***