https://github.com/adoptopenjdk/lambda-tutorial
Exercises to learn lambda syntax + the Streams API from the upcoming JDK 8 release
https://github.com/adoptopenjdk/lambda-tutorial
Last synced: 8 months ago
JSON representation
Exercises to learn lambda syntax + the Streams API from the upcoming JDK 8 release
- Host: GitHub
- URL: https://github.com/adoptopenjdk/lambda-tutorial
- Owner: AdoptOpenJDK
- License: gpl-2.0
- Created: 2013-04-09T12:53:24.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2020-04-11T11:07:24.000Z (almost 6 years ago)
- Last Synced: 2025-03-31T21:42:35.651Z (10 months ago)
- Language: Java
- Size: 240 KB
- Stars: 107
- Watchers: 39
- Forks: 127
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Lambda Tutorial [](https://travis-ci.org/AdoptOpenJDK/lambda-tutorial)
A set of exercises to teach use of Java 8 lambda syntax, and the Streams API.
To follow the exercises:
- fork and clone the repository
- ensure you have a correctly configured, JDK8+ build
- Maven can help generate configuration for your favourite IDE
- ensure your cloned project, particularly the class `ConfigureYourLambdaBuildOfJdk` compiles and runs correctly
- navigate to the first exercise, `Exercise_1_Test` (tests are in `src/test/java`, in the package `org.adoptopenjdk.lambda.tutorial`)
- read background information in the JavaDoc, and follow instructions, making the test pass
- to find solutions check out different branches of the project. Two flavours of solutions are available: what it might have looked like before JDK 8, and what it might look like after JDK 8. Those are in branches `solutions-prejava8` and `solutions-postjava8` respectively.
### Exercises
1. Internal vs External Iteration (the forEach method)
2. Filtering and Collecting
3. Mapping
4. Method References
5. Default methods on interfaces