Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In java can inner classes inherit from an abstract class defined outside of the inner class's outer class?

In java can inner classes inherit from an abstract class defined outside of the inner class's outer class?

Also can abstract classes implement constructors?

like image 514
David Avatar asked Jan 29 '26 23:01

David


1 Answers

Yes to both.

For example it is quite common to extend Swing Listener Adapter classes in inner classes

Why didn't you just try it?

like image 97
Jens Schauder Avatar answered Feb 01 '26 15:02

Jens Schauder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!