Hi,
Please see following classes doing the same thing in different ways
Case I: Without using Anonymous Inner Classes.
With this version of code you can do the following things
1. You can implement not only runnable interface but multiple interfaces using comma separated list of interface names. This is not possible in Case II and III versions.
2. You can extend one class and implement multiple interfaces. This is also not possible in II and III.
Case II: Anonymous Inner Class Version with implementing only one Runnable interface
Case III: Anonymous Inner Class Version with extending only one
Thread class
Hope this will clear your understanding.
Thanks,
Kushan