Question 11
Consider the code given below.
interface Workable{ void work();}class Human{ public Workable getHeart() { return new Heart(); } public Workable getKidney() { return new Kidney(); } private class Heart implements Workable{ public void work() { System.out.println("Pumps blood"); } } private class Kidney implements Workable{ public void work() { System.out.println("Removes wastes"); } }}public class PrivateTest { public static void main(String[] args) { //CODE BLOCK }}Choose the correct option to be filled in place of CODE BLOCK so that the output is:
Pumps blood
Removes wastes