What happens if the base and derived class contains definition of a function with same prototype?

Question:What happens if the base and derived class contains definition of a function with same prototype?

1. Compiler reports an error on compilation.

2.Only base class function will get called irrespective of object.

3.Only derived class function will get called irrespective of object.

4.Base class object will call base class function and derived class object will call derived class function.


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!