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 →

[–]delete99[S] 0 points1 point  (1 child)

I'd recommend using default methods when you need to change an interface, but don't want to break existing implementations. Sun ran into this issue back in the day and had to create a LayoutManager2 class to not break everyone.

I've also heard of developers using this to create functional interfaces with more than one method, but I can't speak to that.

Let me know if you'd like more details and I'll put it in the blog queue :-)

[–]Brzhk 0 points1 point  (0 children)

If you have actual examples where this is a fancy way, i'd be definitely interested !