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 / narayana
This will not compile because in the base class myMethod()
function is not having the body ,only abstract methods
should not have the body remaining all methods should have
the body
| Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
What is the purpose of a volatile variable?
What 4 doubled?
What is a literal coding?
What is one third plus one third as a fraction?
Is sizeof a preprocessor?
What is dynamic array in java?
Which sorting algorithm is in place?
What are the disadvantages of using inner classes?
How does hashset work in java?
What is difference between final and finally in java?
Difference between static binding and dynamic binding?
What does %4d mean in java?
What is array class in java?
What is initial size of arraylist in java?
What is flush buffer?