Java

Java Tricky Program 11 – Double Brace Initialization



Double Brace Initialization is one of the rarely used concept in java – this is combination of two braces. The outer one is creating an anonymous subclass and in the inner braces we call methods or do some initialization of variables.

Similar Posts

One thought on “Java Tricky Program 11 – Double Brace Initialization
  1. when i check this class file in jdb jui tool in the second when we create hashset validcode1 it shows just
    HashSet local1 = new HashSet() {};
    why it not show the initialization braces?

Leave a Reply

Your email address will not be published. Required fields are marked *