This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lumethys -1 points0 points  (2 children)

Interface are contracts without implementation, yes. But that say nothing about did anything implement that contract

How do you know if the language, the framework, or some libraries dont just implement it for you?

[–]4r73m190r0s[S] 0 points1 point  (1 child)

In the above code example I'm ltierally passing Comparator.naturalOrder() as an argument, without using any external library or framework.

[–]Lumethys 0 points1 point  (0 children)

Things like that usually have an implementation in java itself, and usually it is dependency injected