This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Future; | |
| import java.util.concurrent.LinkedBlockingQueue; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Java 8 has been the most awaited and is a major feature release of Java. I have tried to cover some of the feature in this blog. | |
| Default Methods for Interfaces:- | |
| Java 8 enables us to add non-abstract method implementations to interfaces by utilizing the default keyword. | |
| Example - This functionality can reduce a lot of code of duplication in case more than one has same implementation. | |
| We can just define it as default and only in case of different implementation override the method. | |
| interface A { | |
| void method1(int a); |