Posts by Lana • 51 points
1 post
-
5
votes1
answer167
viewsQ: Templated Method - Is it possible to implement with composition rather than inheritance?
To create a Thread we can both extend the class Thread and overwrite the method run(), how to have a class that implements the interface Runnable, implement the method run() and pass the reference…