What happens if we override private method?



What happens if we override private method?..

Answer / Rakesh Kumar

Private methods are not inheritable, so they cannot be overridden in subclasses. If a superclass has a private method and a subclass tries to override it with the same name, the subclass's version will not be considered during runtime.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why there is no call by reference in java?

1 Answers  


Can I override protected method in java?

1 Answers  


What do you understand by the term string pool?

1 Answers  


Define a java class.

2 Answers  


What is super?

1 Answers  


Can final class have constructor?

1 Answers  


what is filters and its use?

2 Answers   Virtusa,


Will set allow duplicates in java?

1 Answers  


How will you compute size of a structure?

1 Answers   Amdocs,


Difference between object instantiation and construction ?

1 Answers  


What are the 6 boolean operators?

1 Answers  


When you Click a Button, What event will be fired?

5 Answers  


Categories