Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Interface declaration, need to clarify

$
0
0
public interface Relatable {
    
    // this (object calling isLargerThan)
    // and other must be instances of 
    // the same class returns 1, 0, -1 
    // if this is greater // than, equal 
    // to, or less than other
    public int isLargerThan(Relatable other);
}



in the method signature, Why do we use Relatable? Is it compulsary?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>