Class or interface expected error (java)
- by David
When i try to compile this:
public static int compareCardhl (Card c1, Card c2)
}
if (c1.suit > c2.suit) return 1 ;
if (c1.suit < c2.suit) return -1 ;
if (c1.rank > c2.rank) return 1 ;
if (c1.rank < c2.rank) return -1 ;
return 0;
}
i get a lot of class or intereface expected errors. They all point at the if's. i also get a ; expected error at the end of Card c2).
whats going wrong here?