1.

What will happen if we provide concrete implementation of method in interface?(a) The concrete class implementing that method need not provide implementation of that method(b) Runtime exception is thrown(c) Compilation failure(d) Method not found exception is thrownI had been asked this question during a job interview.This interesting question is from Interfaces in portion Interfaces & Packages of Java

Answer»

Right answer is (c) COMPILATION failure

The best explanation: The METHODS of interfaces are ALWAYS abstract. They PROVIDE only METHOD definition.



Discussion

No Comment Found

Related InterviewSolutions