Nested Classes in Java: Anonymous Classes
A local class without a name is called an anonymous class. If we need only a single instance of a local class, we will create an anonymous class. Typically, a local class has a name and thus a declaration.
A local class without a name is called an anonymous class. If we need only a single instance of a local class, we will create an anonymous class. Typically, a local class has a name and thus a declaration.
Suppose we are required to create an application that generates a random list of odd numbers.
© Copyright © 2010 - 2018 MindStick Software Pvt. Ltd. All Rights Reserved