Posts

Showing posts from October, 2013

Interfaces in Java 8!

"Before Java 8, interfaces could only contain abstract methods and constants. However, starting with Java 8, interfaces will be permitted to contain defensive methods. "We finally bit the bullet and addressed the problem of interface evolution,"Geotz said. "We added a concept called default methods. This allows you to add a method to an interface in a compatible way, as long as you provide a default implementation." This is, without a doubt, the big language change that makes Java aficionados the most uncomfortable. While everyone understands the motivation behind Lambda, such a drastic change to a fundamental language feature makes it seem as though these new Java 8 features are being shoehorned in, forced to fit in a way that isn't natural or elegant." See the entire article at http://www.theserverside.com/news/2240206156/Lambda-Java-8-interface-evolution-and-laws-of-unintended-consequences