MultilevelInheritance2753 - Java Quiz Question


What will be the output of following program?

class Producer
{
    void story()
    {
        System.out.println("No story");
    
    }
}    
class Director extends Producer
{
    void story()
    {
        super.story();
        System.out.println("With story");
    }
}
class Hero extends Director
{
    void story()
    {
        super.story();
        System.out.println("Good Movie");
    }    

}
public class Movie
{
    public static void main(String args[])
    {
        Hero hero=new Hero();
        hero.story();
    }
}


A
Good Movie
B
With story
Good Movie
C
No story
With story
Good Movie
D
Compilation Error or Runtime Error