Menu
Question Index
...

Which of the following can be inserted at LINE M?

class MeritCampus
{
        public static void main(String [] args)
        {
    
        }
}
class Merit
{
        Merit(String s)
        {
    
        }
    
        Merit()
        {
    
        }
}

class Campus extends Merit
{
        Campus()
        {
    
        }
    
        Campus(String s)
        {
            super(s);
        }
    
        void insert()
        {
            //LINE M
        }
}


Merit f = new Campus() { };
Merit f = new Merit(24) { };
Campus f = new Merit(String s) { };
Merit f = new Merit.Campus(String s) { };

Doubts

Problems

Topic: Inheritance And Constructors In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App