Final arguments in interface methods - what's the point?

前端 未结 5 1891
甜味超标
甜味超标 2020-11-28 03:26

In Java, it is perfectly legal to define final arguments in interface methods and do not obey that in the implementing class, e.g.:

public inter         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 03:58

    I believe it may be a superfluous detail, as whether it's final or not is an implementation detail.

    (Sort of like declaring methods/members in an interface as public.)

提交回复
热议问题