This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Saibabaa Pragada wrote:Hi, This is from ExamLab. Please advice why I am getting this error at Line 9.
rb is Runnable(Supertype) type reference-variable and is referring to an instance of its anonymous subclass(Subtype), so using that reference it is not possible to invoke a method that does not exist in Runnable<interface>.
Note: When super class reference-variable is referring subclass instance then through that reference only those methods can be invoked that exists in both superclass and the subclass.