Will this code compile successfully? (1 correct answer)
Niko says b, but it compiles fine for me, where is the problem? I thought you can add as many overloading methods you wish, as long as the attributes differ. Or is it just because the import statement lacks for the Overload class?
Interface methods are by default public,abstract whether you declare it in interface or not.
In above code,when you are provide implementation to above public abstract method of interface in other
class that implements it,then it's access level and exception can't be more restrictive.(Overriding also says this)
default is more restrictive than public. default can be made public or protected but vice versa is false.