Hello,
Below is code I created based on Sierra/Bates Chapter 7. It compiles and runs; I have a related question. See below.
This following is output:
[2001 sci-fi ??
, Caddy Shack comedy Murray, Bill
, Donnie Darko sci-fi Gyllenhall, Jake
, Lost in Translation comedy Murray, Bill
, Patriot Games action Ford, Harrison
, Raiders of the Lost Ark action Ford, Harrison
, Star Wars sci-fi Ford, Harrison
]
Is there another way this code can compare dvdList without having DVDInfo extend Comparable? Sierra/Bates mentions:
Returning to our earlier example for class DVDInfo, we can take the easy way out and use the String class’s implementation of compareTo():
Please clarify what is the un-easy way to compare dvdList?