Women in Technology

Hear us Roar



Article:
  Nested Classes, Part 3
Subject:   Nested classes in interfaces
Date:   2004-06-01 01:43:21
From:   MarkThornton
In my opinion a good use of a nested class in an interface would be to implement constants defined in the interface. For example:


public interface Set {
Set EMPTY = new EmptySet();


private class EmptySet implements Set {
}
}