I wonder what’s the difference between static interface with usual interface without such keyword in java?
And When and where we should use the static keyword before interface.And why we should use it ? You can take this interface as an example
Thank you so much!
public static interface Map.Entry<K,V>
I wonder what’s the difference between static interface with usual interface without such keyword
Share
There’s no difference:
staticis implied – all interfaces are effectively static.The use or not or the
statickeyword is a matter of style. Personally, I prefer to usestaticas it’s in keeping with the semantics of an inner static class.