{"id":18863607,"url":"https://github.com/neiljbrown/java17-examples","last_synced_at":"2025-04-14T13:06:25.735Z","repository":{"id":89469405,"uuid":"410325383","full_name":"neiljbrown/java17-examples","owner":"neiljbrown","description":"Examples of Java language features available in Java 17 (new features introduced since previous LTS release, Java 11).","archived":false,"fork":false,"pushed_at":"2021-11-06T15:58:14.000Z","size":137,"stargazers_count":4,"open_issues_count":0,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:11:11.346Z","etag":null,"topics":["examples","java","java17"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neiljbrown.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-25T16:34:53.000Z","updated_at":"2024-12-12T10:02:40.000Z","dependencies_parsed_at":"2023-03-08T21:30:49.795Z","dependency_job_id":null,"html_url":"https://github.com/neiljbrown/java17-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava17-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava17-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava17-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava17-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neiljbrown","download_url":"https://codeload.github.com/neiljbrown/java17-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886312,"owners_count":21177643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["examples","java","java17"],"created_at":"2024-11-08T04:37:59.820Z","updated_at":"2025-04-14T13:06:25.697Z","avatar_url":"https://github.com/neiljbrown.png","language":"Java","readme":"= Java 17 Examples\n:sectlinks:\n:sectnums:\n:sectnumlevels: 4\n:toclevels: 4\n\n== Purpose\nThis project provides a set of runnable Java code examples illustrating new language features and APIs that have been\nintroduced  in Java since JDK 11, up to and including JDK 17, the next Long Term Support (LTS) release, which is\nscheduled to become generally available in Sept 2021.\n\n== Showcased Java Language Features\nThe project showcases examples of language features that were finalised in JDK releases 12 to JDK 17 inclusive. These\nare summarised below, categorised by JDK release, along with a link to their final Java Enhancement Proposal (JEP).\n\n1) Language Features Finalised in JDK 14 (March 2020) -\n\n* *Switch Expressions* - See https://openjdk.java.net/jeps/361[JEP 361: Switch Expressions].\n\n2) Language Features Finalised in JDK 15 (Sept 2020) -\n\n* *Text Blocks* - See https://openjdk.java.net/jeps/378[JEP 378: Text Blocks].\n\n3) Language Features Finalised in JDK 16 (March 2021) -\n\n* *Pattern Matching for instanceof* - See https://openjdk.java.net/jeps/394[JEP 394: Pattern Matching for instanceof].\n* *Records* - See https://openjdk.java.net/jeps/395[JEP 395: Records].\n\n4) Language Features Finalised in JDK 17 (Sept 2021) -\n\n* *Sealed Classes* - See https://openjdk.java.net/jeps/409[JEP 409: Sealed Classes].\n\nFor a full list of the JEPs that were added since the previous JDK 11 LTS release, see\nhttps://openjdk.java.net/projects/jdk/17/jeps-since-jdk-11.\n\n== Source Code\nThe examples are implemented as a set of easy to run tests, using JUnit (5). The source code for the examples can be\nfound in the src/test/java folder.\n\nAn explanation of the showcased language features, along with guidance on their usage, can be found in the Javadoc of\neach of the code examples. (See the commands for generating Javadoc below).\n\n== Building and Running the Examples\nYou will need to install a Java 17 JDK. (Use of sdkman is recommended).\n\nSupport is provided for building and running the project using either Gradle or Maven as described in the sections\nbelow.\n\n=== Gradle\nThe minimum required version of Gradle will be installed if you execute the build using the supplied Gradle wrapper\nscript (./gradlew).\n\nTo compile and run all the example tests, enter the  following command in the project's root folder:\n\n`./gradlew clean test`\n\nTo generate the Javadoc, use the following command:\n\n`./gradlew clean javadocTests`\n\nThe generated Javadoc can be found in the standard location for a Gradle project - build/docs/javadoc/index.html.\n\nFor more details of Gradle build support see build.gradle in the project's root folder.\n\n=== Maven\nThe minimum required version of Maven will be installed if you execute the build using the supplied Maven wrapper\nscript (./mvnw).\n\nTo compile and run all the example tests, enter the following command in the project's root folder:\n\n`./mvnw clean test`\n\nTo generate the Javadoc, use the following command:\n\n`./mvnw javadoc:test-javadoc`\n\nThe generated Javadoc can be found in the standard location for a Maven project - target/site/testapidocs/index.html.\n\nFor more details of Maven build support see pom.xml in the project's root folder.\n\n== Other Examples\nYou can find similar code examples for the new features introduced in earlier versions in Java in my other code\nrepos, including -\n\n* Java 11 - See https://github.com/neiljbrown/java11-examples[GitHub project neiljbrown/java11-examples]\n* Java 10 - See https://github.com/neiljbrown/java10-examples[GitHub project neiljbrown/java10-examples]\n* Java 9 - See https://github.com/neiljbrown/java9-examples[GitHub project neiljbrown/java9-examples]\n* Java 7 and 8 - See my https://bitbucket.org/neilbrown/[Bitbucket projects]\n\nEnd.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneiljbrown%2Fjava17-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneiljbrown%2Fjava17-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneiljbrown%2Fjava17-examples/lists"}