notes on java: inheritance, .equals, comparator vs comparable