The second
compareTo is called on the
title member variable. So that code means "DVDs should be ordered alphabetically by their title". So the thing you want to order by is a
String. How to do that? Well, the
String class implements
Comparable, so you just have to delegate to the
compareTo() method there.
By the way,
you should use the generic version of Comparable. That way you avoid having to cast, and you get better type safety.