Algorithms and OOD (CSC 207 2014S) : Outlines

Outline 22: Detour: Anonymous Inner Classes


Held: Tuesday, 25 February 2014

Back to Outline 21 - Exam 1 Discussion. On to Outline 23 - OOD in Practice: Designing a List Interface.

Summary

We explore anonymous inner classes, a powerful Java programming technique.

Related Pages

Overview

Administrivia

Anonymous Inner Classes

Syntax

With interfaces

new *Interface*() 
  {
    *Body of Class*
  }

With classes

new *Class*()
  {
    *Body of Subclass*
  }

Subtleties

Lab

Copyright (c) 2013-14 Samuel A. Rebelsky.

Creative Commons License

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.