Class or interface expected error (java)
        Posted  
        
            by David
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by David
        
        
        
        Published on 2010-03-21T18:51:24Z
        Indexed on 
            2010/03/21
            19:41 UTC
        
        
        Read the original article
        Hit count: 198
        
java
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?
© Stack Overflow or respective owner