Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
383 B
2
Indexable
Never
class A
{
    void eat()
    {
        System.out.println("BCA");
    }
}
class B extends A
{
    void eats()
    {
        System.out.println("Drc");
    }
}
class c extends B
{
    void eat2()
    {
        System.out.println("Sec-A");
    }
    public static void main(String args[])
    {
        c obj= new c();
        obj.eat();
        obj.eats();
        obj.eat2();
    }
}
Leave a Comment