Question 16
Consider the code given below.
interface Chargable{ void charge();}interface Supplyable{ void supply();}class Bike{ public Battery getBattery() { return new Battery(); } private class Battery implements Chargable,Supplyable { public void charge() { System.out.println("Charges automatically while you ride"); } public void supply() { System.out.println("Supplies current the bike requires"); } }}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:
Charges automatically while you ride
Supplies current the bike requires