Hello Friends ,
This is from Abhilash's mock exam.
Question 9.
public interface AQuestion
{
void someMethod();
}
The class which implements AQuestion
1.Should have someMethod which must necessarily be coderanch.
2.Should have someMethod which could be "friendly" or public
3.Should have someMethod which should not throw any checked exceptions.
4.Should have someMethod which cannot be sychronized as sychronized is not in the signature of the interface
defination
The answers given are 1,3.
But my answer is 2,3.
1 is wrong, because the access modifier could be protected.
2 Though there is no keyword called friendly i assumed that he
was referring to friendly access specifier because he put
friendly
word in double quotes("friendly").(What would you 0do?)
3. is right, because the super method is not throwing any
checked exceptions
Any takers,
Thanks