Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

In which cases you use override and new base?

Answers were Sorted based on User's Feedback

In which cases you use override and new base?..

Answer / naveen goud

It is used to ovveride superclass method.Suppose in super
calss we had a method getEmployee() in the subclass am
overriding it and am giving the new implementation.Means am
just giving new implementation instead of using the same

Is This Answer Correct ?    0 Yes 0 No

In which cases you use override and new base?..

Answer / swetcha

Use the new modifier to explicitly hide a member inherited
from a base class. To hide an inherited member, declare it
in the derived class using the same name, and modify it
with the new modifier.

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More OOPS Interview Questions

What Is a Polymorphism? How many types of polymorphism and whats that use in application?

2 Answers  

3. Differentiate verification and validation.

1 Answers  

What is difference between #define and const?

3 Answers   emc2,

how to swap to variables without using thrid variable in java?

5 Answers  

Why static functions always uses static variables?

3 Answers  

in the following, A D B G E C F Each of the seven digits from 0,1,2,3,4,5,6,7,8,9 is: a)Represented by a different letter in abov fig: b)Positioned in the fig abov so tht A*B*C,B*G*E,D*E*F are equal. wch does g represents? C

1 Answers   IonIdea,

how to tackle technical questions

1 Answers  

How can we use the preprocessor #if and #elseif.

2 Answers  

what is difference b/w object based and object oriented programming language?

18 Answers   Chaitanya, College School Exams Tests, Educomp, IBM, Infosys, Telko,

What is namespace?

15 Answers  

what is virtual function in c++

6 Answers  

What is the purpose of polymorphism?

0 Answers