+ 1
Explain code
abstract class jay { abstract void bike(); void car() { System.out.println("Car is running"); } } class Honda extends jay { @Override void bike() { System.out.println("Bike is running"); } } public class AbstractExample2 { public static void main(String[] args) { Honda obj=new Honda(); obj.bike(); obj.car(); } }
3 Respuestas