I was referring to the Collection Interface of Java 8, where I saw that Collection method has concrete method public boolean removeIf(Predicate paramPredicate) , but as per the definition of Interface we can only have static and default method with body and rest can be abstract.
I tried creating the concrete method in an Interface and received compile time error Abstract methods do not specify a body with 3 quick fixes from eclipse:
- Change method to default
- Change method to static
- Remove method body
Can anyone explain how Collection interface has concrete implementation of methods removeIf , spliterator , stream , parallelStream ?