Cucumber Java 8 Support 1. Overview In this quick tutorial, we’ll learn how to use Java 8 lambda expressions with Cucumber. 2. Maven Configuration First, we will need to add the following dependency to our pom.xml: <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-java8</artifactId> <version>1.2.5</version> <scope>test</scope> </dependency> The cucumber-java8 dependency can be found on Maven… Continue Reading cucumber-java-8-support

Lambda Expressions and Functional Interfaces: Tips and Best Practices 1. Overview Now that Java 8 has reached wide usage, patterns, and best practices have begun to emerge for some of its headlining features. In this tutorial, we will take a closer look to functional interfaces and lambda expressions. Further reading:… Continue Reading java-8-lambda-expressions-tips

Why Do Local Variables Used in Lambdas Have to Be Final or Effectively Final? 1. Introduction Java 8 gives us lambdas, and by association, the notion of effectively final variables. Ever wondered why local variables captured in lambdas have to be final or effectively final? Well, the JLS gives us… Continue Reading java-lambda-effectively-final-local-variables