java getSimpleName returns empty string
- Krishna Chaitanya
- Jun 3, 2018
- 1 min read
This happens when getSimpleName() method is called on an anonymous class.
The following is the output of the class names for normal class and anonymous class.
As you can see canonical name is null in this case.
Comments