Can we have default method with same name and signature in the derived interface as the static method in base interface and vice versa?



Can we have default method with same name and signature in the derived interface as the static metho..

Answer / Satyendra Kumar Singh

No, it is not possible to have a default method with the same name and signature as a static method in a base interface or a derived interface. Static methods are class-level methods that are not part of the class hierarchy, while default methods are instance-level methods that can be overridden by subclasses.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

What is the difference between a class and a structure?

1 Answers  


If a class inherits an interface, what are the 2 options available for that class?

1 Answers  


What is the default access modifier in a class?

1 Answers  


What is the best tool for modeling and ORM framework

1 Answers   Infosys,


Explain the rationale behind object oriented concepts?

1 Answers  


How to differentiate between a CreateObject() and GetObject() ?

1 Answers   CGI,


What is the difference between an Abstract class and Interface?

1 Answers  


State about java and its relation to object oriented programming?

1 Answers  


What is the purpose of late binding in object-oriented programming?

1 Answers  


Which oops concept exposes only necessary information to the calling functions?

1 Answers  


How to resolve many to many relationship?

6 Answers   InfoAxon Technologies, Protech, Samsung,


Can we override a method by using same method name and arguments but different return types?

1 Answers  


Categories