Exceptional Java – Thoughts on Java exceptions

Dealing with exceptions is hard. For a while now in the Java world there are two camps. One considers the initial design of the Java exceptions system a sensible one, a feature that contributed greatly to Java’s success. A new camp has also formed in Java world and this new camp considers the original design [...]

Anonymous Inner Classes

An anonymous class in Java is a class with no specified name declared and instantiated at the same time. Because it has no name it can only be used once at place of declaration. Anonymous classes implement an interface or extend a class. They cannot declare their own constructors (they don’t have a name known [...]

Local Inner Classes

Local inner classes are declared inside of a block of code. This block can be static bloc, a constructor, a method or simply a block of code surrounded with curly braces. These classes are only visible inside the enclosing bloc, but inside the block full hierarchies of classes can be developed. Local inner classes can [...]

Inner Classes

An inner class is a class declared inside another class. The enclosing class can be a top level class or another inner class. The reason for using inner classes is to properly implement composition when the life of inner class instances are controlled by the outer class instance. Since the inner class instances are always [...]

Static Nested Interfaces

A nested interface is just a regular interface defined inside another class or interface. They are actually defined inside the body of the parent class, not only in the same file. The feature is useful for grouping related interfaces and for encapsulating interfaces in the classes where they are used.

Static Nested Classes

A static nested class is a regular class defined inside of a package level class or inside of another static nested class. They are actually defined inside the body of the parent class, not only in the same file. As with any high level facility offered by a programming language it can be of real [...]

  • Calendar

    May 2012
    M T W T F S S
    « Sep    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • License

    • Creative Commons License