public class Base {
public void myMethod(int a,intb) {}
}
// Uses myMethod and then hides it.
public class DerivedOne extends Base {
private void myMethod(int a,int b);
}
will this compile or not .yes or no. why
Answer Posted / ashwin khandelwal
It cannot be compiled because of weaker access privilege give to method in DerivedOne class while overidding method of Base Class
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
What does super keyword do?
Can we synchronize static methods in java?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
Is it possible to override the main method?
What is numeric data type?
Explain polymorphism citing an example.
What is method in research paper?
What is the use of conditional statement?
What is procedure overloading?
what is difference betweem home interface and remote interface?
What is a dot notation?
How to do a true java ping from windows?
What method is used to specify a container's layout in java programming?
Explain the differences between static and dynamic variables?
Can we sort a map in java?