An object which has no reference variable is called an anonymous object in Java. Anonymous means nameless. If you want to create only one object in a class then the anonymous object is a good approach.Declaration of Anonymous object in JavaThe syntax to