Labs

Files for this lab are in com.example.innerclasses.labs.

Use ShowSortedHits.java, AccessLogComparator.java, and access_log as starter files for these labs.

  1. Modify ShowSortedHits.java so it uses a member inner class as a Comparator, rather than having AccessLogComparator.java as a separate file.

(Solution: ShowSortedHits2.java)

  1. Change your solution to the previous lab to use a local inner class instead of a member inner class.

(Solution: ShowSortedHits3.java)

  1. Change your solution to the previous lab to use an anonymous inner class instead of a local inner class.

(Solution: ShowSortedHits4.java)


Prev -- Up