Java Tricky Program 11 - Double Brace Initialization

preview_player
Показать описание
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.
Рекомендации по теме
Комментарии
Автор

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?

kunaljamdade