- Saved searches
- Use saved searches to filter your results more quickly
- License
- jveverka/java-17-examples
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- Java Examples
- Popular Examples
- Popular Examples
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
JDK 17 examples and demo projects
License
jveverka/java-17-examples
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
This project is WIP ! Stay tuned.
This project aggregates examples of new Java and JVM features between versions 12 and 17 as well as practical java examples tailored for Java 17.
Make sure following software is installed on your PC.
Most examples are build by top-level gradle project.
gradle clean build test installDist distZip
- Most interesting JEPs implemented in JDK12 — JDK17
- JEP 359, 384: Records
- JEP 325, 354, 361: Switch Expressions
- JEP 353: Reimplement the Legacy Socket API
- JEP 355, 368, 378: Text Blocks
- JEP 305: Pattern Matching for instanceof
- JEP 358: Helpful NullPointerExceptions
- JEP 373: Reimplement the Legacy DatagramSocket API
- JEP 370, 383: Foreign-Memory Access API
- JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)
- JEP 360: Sealed Classes (Preview)
- JEP 371: Hidden Classes
- JDK12 [2019-03-19] Feature list
- JDK13 [2019-09-17] Feature list
- JDK14 [2020-03-17] Feature list
- JDK15 [2020-09-15] Feature list
- JDK16 [2021-03-16] Feature list
- JDK17 [2021-09-14] Feature list
Java Examples
The best way to learn Java programming is by practicing examples. The page contains examples on basic concepts of Java. You are advised to take the references from these examples and try them on your own.
All the programs on this page are tested and should work on all platforms.
Want to learn Java by writing code yourself? Enroll in our Interactive Java Course for FREE.
Popular Examples
Java Program to Check Prime Number
Java Program to Display Fibonacci Series
Java Program to Create Pyramids and Patterns
Java Program to Reverse a Number
Popular Examples
- Java Program to Print an Integer (Entered by the User)
- Java Program to Add Two Integers
- Java Program to Multiply two Floating Point Numbers
- Java Program to Find ASCII Value of a character
- Java Program to Compute Quotient and Remainder
- Java Program to Swap Two Numbers
- Java Program to Check Whether a Number is Even or Odd
- Java Program to Check Whether an Alphabet is Vowel or Consonant
- Java Program to Find the Largest Among Three Numbers
- Java Program to Find all Roots of a Quadratic Equation
- Java Program to Check Leap Year
- Java Program to Check Whether a Number is Positive or Negative
- Java Program to Check Whether a Character is Alphabet or Not
- Java Program to Calculate the Sum of Natural Numbers
- Java Program to Find Factorial of a Number
- Java Program to Generate Multiplication Table
- Java Program to Display Fibonacci Series
- Java Program to Find GCD of two Numbers
- Java Program to Find LCM of two Numbers
- Java Program to Display Alphabets (A to Z) using loop
- Java Program to Count Number of Digits in an Integer
- Java Program to Reverse a Number
- Java Program to Calculate the Power of a Number
- Java Program to Check Palindrome
- Java Program to Check Whether a Number is Prime or Not
- Java Program to Display Prime Numbers Between Two Intervals
- Java Program to Check Armstrong Number
- Java Program to Display Armstrong Number Between Two Intervals
- Java Program to Display Prime Numbers Between Intervals Using Function
- Java Program to Display Armstrong Numbers Between Intervals Using Function
- Java Program to Display Factors of a Number
- Java Program to Make a Simple Calculator Using switch. case
- Java Program to Check Whether a Number can be Expressed as Sum of Two Prime Numbers
- Java Program to Find the Sum of Natural Numbers using Recursion
- Java Program to Find Factorial of a Number Using Recursion
- Java Program to Find G.C.D Using Recursion
- Java Program to Convert Binary Number to Decimal and vice-versa
- Java Program to Convert Octal Number to Decimal and vice-versa
- Java Program to Convert Binary Number to Octal and vice-versa
- Java Program to Reverse a Sentence Using Recursion
- Java Program to calculate the power using recursion
- Java Program to Calculate Average Using Arrays
- Java Program to Find Largest Element of an Array
- Java Program to Calculate Standard Deviation
- Java Program to Add Two Matrix Using Multi-dimensional Arrays
- Java Program to Multiply Two Matrix Using Multi-dimensional Arrays
- Java Program to Multiply two Matrices by Passing Matrix to a Function
- Java Program to Find Transpose of a Matrix
- Java Program to Find the Frequency of Character in a String
- Java Program to Count the Number of Vowels and Consonants in a Sentence
- Java Program to Sort Elements in Lexicographical Order (Dictionary Order)
- Java Program to Add Two Complex Numbers by Passing Class to a Function
- Java Program to Calculate Difference Between Two Time Periods
- Java Code To Create Pyramid and Pattern
- Java Program to Remove All Whitespaces from a String
- Java Program to Print an Array
- Java Program to Convert String to Date
- Java Program to Round a Number to n Decimal Places
- Java Program to Concatenate Two Arrays
- Java Program to Convert Character to String and Vice-Versa
- Java Program to Check if An Array Contains a Given Value
- Java Program to Check if a String is Empty or Null
- Java Program to Get Current Date/TIme
- Java Program to Convert Milliseconds to Minutes and Seconds
- Java Program to Add Two Dates
- Java Program to Join Two Lists
- Java Program to Convert a List to Array and Vice Versa
- Java Program to Get Current Working Directory
- Java Program to Convert Map (HashMap) to List
- Java Program to Convert Array to Set (HashSet) and Vice-Versa
- Java Program to Convert Byte Array to Hexadecimal
- Java Program to Create String from Contents of a File
- Java Program to Append Text to an Existing File
- Java Program to Convert a Stack Trace to a String
- Java Program to Convert File to byte array and Vice-Versa
- Java Program to Convert InputStream to String
- Java Program to Convert OutputStream to String
- Java Program to Lookup enum by String value
- Java Program to Compare Strings
- Java Program to Sort a Map By Values
- Java Program to Sort ArrayList of Custom Objects By Property
- Java Program to Check if a String is Numeric
- Java Program to convert char type variables to int
- Java Program to convert int type variables to char
- Java Program to convert long type variables into int
- Java Program to convert int type variables to long
- Java Program to convert boolean variables into string
- Java Program to convert string type variables into boolean
- Java Program to convert string type variables into int
- Java Program to convert int type variables to String
- Java Program to convert int type variables to double
- Java Program to convert double type variables to int
- Java Program to convert string variables to double
- Java Program to convert double type variables to string
- Java Program to convert primitive types to objects and vice versa
- Java Program to Implement Bubble Sort algorithm
- Java Program to Implement Quick Sort Algorithm
- Java Program to Implement Merge Sort Algorithm
- Java Program to Implement Binary Search Algorithm
- Java Program to Call One Constructor from another
- Java Program to implement private constructors
- Java Program to pass lambda expression as a method argument
- Java Program to pass method call as arguments to another method
- Java Program to Calculate the Execution Time of Methods
- Java Program to Convert a String into the InputStream
- Java Program to Convert the InputStream into Byte Array
- Java Program to Load File as InputStream
- Java Program to Create File and Write to the File
- Java Program to Read the Content of a File Line by Line
- Java Program to Delete File in Java
- Java Program to Delete Empty and Non-empty Directory
- Java Program to Get the File Extension
- Java Program to Get the name of the file from the absolute path
- Java Program to Get the relative path from two absolute paths
- Java Program to Count number of lines present in the file
- Java Program to Determine the class of an object
- Java Program to Create an enum class
- Java Program to Print object of a class
- Java Program to Create custom exception
- Java Program to Create an Immutable Class
- Java Program to Check if two strings are anagram
- Java Program to Compute all the permutations of the string
- Java Program to Create random strings
- Java Program to Clear the StringBuffer
- Java Program to Capitalize the first character of each word in a String
- Java Program to Iterate through each characters of the string.
- Java Program to Differentiate String == operator and equals() method
- Java Program to Implement switch statement on strings
- Java Program to Calculate simple interest and compound interest
- Java Program to Implement multiple inheritance
- Java Program to Determine the name and version of the operating system
- Java Program to Check if two of three boolean variables are true
- Java Program to Iterate over enum
- Java Program to Check the birthday and print Happy Birthday message
- Java Program to Implement LinkedList
- Java Program to Implement stack data structure
- Java Program to Implement the queue data structure
- Java Program to Get the middle element of LinkedList in a single iteration
- Java Program to Convert the LinkedList into an Array and vice versa
- Java Program to Convert the ArrayList into a string and vice versa
- Java Program to Iterate over an ArrayList
- Java Program to Iterate over a HashMap
- Java Program to Iterate over a Set
- Java Program to Merge two lists
- Java Program to Update value of HashMap using key
- Java Program to Remove duplicate elements from ArrayList
- Java Program to Get key from HashMap using the value
- Java Program to Detect loop in a LinkedList
- Java Program to Calculate union of two sets
- Java Program to Calculate the intersection of two sets
- Java Program to Calculate the difference between two sets
- Java Program to Check if a set is the subset of another set
- Java Program to Sort map by keys
- Java Program to Pass ArrayList as the function argument
- Java Program to Iterate over ArrayList using Lambda Expression
- Java Program to Implement Binary Tree Data Structure
- Java Program to Perform the preorder tree traversal
- Java Program to Perform the postorder tree traversal
- Java Program to Perform the inorder tree traversal
- Java Program to Count number of leaf nodes in a tree
- Java Program to Check if a string contains a substring
- Java Program to Access private members of a class
- Java Program to Check if a string is a valid shuffle of two distinct strings
- Java Program to Implement the graph data structure
- Java Program to Remove elements from the LinkedList.
- Java Program to Add elements to a LinkedList
- Java Program to Access elements from a LinkedList.