I started to learn JAVA 20 years ago when I was a student in the university. After that in so many years I had kept remembering JAVA interface can only be used to define method, not implementation. However things changed after JAVA 8 emerged. People can implement a method in an Interface. And as the … Continue reading Interface Static Method and Default Method
Category: JAVA 8
Strategy Design Pattern Implementation using Lambda
Recently I tested a complicated module with many different workflows . For different orders, they will go through various workflow. This is a typical scenario of using Strategy Design Pattern, I had implemented this before but this time I use JAVA 8 lambdar to refactor it. To simplify the problem, I use following Student class … Continue reading Strategy Design Pattern Implementation using Lambda