What is the output of the following java code? class car{ void run(){ System.out.println("Car is running"); } } public class Audi extends car{ void…

What is the output of the following java code?

class car{
    void run(){
        System.out.println("Car is running");
    }
}
public class Audi extends car{
    void run(){
        System.out.println("Audi is running");
    }
    public static void main(String[] args){
        car b=new Audi();
        b.run();
    }
}

From the DESCO Assistant Engineer (CSE) 2019 – Written (BUET) exam, question 3 of 9.

More from this paper