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
Explain with example the concept of constant variable in java.
Is it possible to write a regular expression to check if string is a number?
What is the declaration statement?
What is a parameter in simple terms?
How can we break singleton in java?
What is argument in java?
Is .net better than java?
Can final class have constructor?
How do you get the length of a string in java?
Difference between arraylist and vector.
What is a lambda expression ? What's its use ?
What is the current version of java?
Which is bigger float or double?
What do you meant by active and passive objects?
Is it possible for a yielded thread to get chance for its execution again?