Quick Refresh : Java 8 : Features
Quick Refresh: Java 8: features Some of the important Java 8 features are: forEach() method in Iterable interface default and static methods in Interfaces Functional Interfaces and Lambda Expressions Java Stream API for Bulk Data Operations on Collections Java Time API Collection API improvements Concurrency API improvements Java IO improvements Miscellaneous Core API improvements Java8 interface changes include static methods and default methods in interfaces. Prior to Java 8, we could have only method declarations in the interfaces. But from Java 8, we can have default methods and static methods in the interfaces. We can use default and static keyword to create interfaces with method implementation. If you read forEach method details carefully, you will notice that it’s defined in the Iterable interface but we know that interfaces can’t have a method body. From Java 8, interfaces are enhanced to ...