Online Java Compiler By
JavaTpoint.com
class Vehicle { abstract class Car { abstract void display(); } class Honda extends Car { @Override void display() { System.out.println("inner abstract class is invoked"); } } } public class AbstractExample5 { public static void main(String[] args) { Vehicle obj=new Vehicle(); Vehicle.Car c=obj.new Honda(); c.display(); } }
Output