Is the C# “explicit implementation” of the interface present in Java?

前端 未结 4 1702
忘掉有多难
忘掉有多难 2020-12-17 14:23

In C#, if you have two base interfaces with the same method (say, F()) you can use explicit implementation to perform different impl. for F(). This alloes you to differently

4条回答
  •  心在旅途
    2020-12-17 15:08

    No and it should never be present in Java. It's just another bone to throw at people who can't be bothered with good design.

    Explicit implementation of an interface should never be needed or used. There are better ways to solver the problem that this tries to solve.

提交回复
热议问题