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.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-45
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,31 @@
1
-
# JavaCoreSnippets
2
-
programs and code snippets to showcase the might of Java platform (as of Java API), algorithms implemented using Java language and the types and method to refer and use in other projects.
1
+
# Java Core Snippets
2
+
-programs and code snippets to showcase the might of Java platform (as of Java API), algorithms implemented using Java language, and the types & methods to refer & use in other projects.
3
3
4
-
## Java 11 API
5
-
New features available in Java SE 11. These are the features added to JLS in the versions later to Java SE 8. Most frequently used features are:
6
-
- Method `T[] Collection.toArray(IntFunction<T[]> generator )` to use instead of first generating a stream and then invoking `A[] Stream.toArray(IntFunction<A[]> generator);`
- A number of new methods foster our most-loved class `java.lang.String`. These are: `isBlank()`, `strip()`, `stripLeading()`, `stripTrailing()`, `repeat(intCount)`
23
-

24
-

4
+
- First of all, let's start with some of the updates and advancements in Java library (aptly called Java API).
5
+
6
+
## What's available in Java 17 API
7
+
New features available in Java 17 over Java 14. Features, which are most notable and stand as the best candidates for frequent use, are listed below:
8
+
- restore always-Strict floating-point semantics: It ensures same results of floating-point calculations on every platform.
9
+
- enhanced pseudo-random number generators: class java.util.Random implements interface java.util.random.RandomGenerator. Such new implementations of pseudo random number generators allow for better support for stream-based programming.
10
+
- new macOS rendering pipeline
11
+
- macOS/AArch64 port
12
+
- deprecate the Applet API for removal
13
+
- strongly encapsulate JDK internals
14
+
- pattern matching for switch (preview)
15
+

16
+
- remove RMI activation
17
+
- sealed classes
18
+
- remove the experimental AOT and JIT compilers
19
+
- deprecate the Security Manager for removal
20
+
- Foreign Function and Memory API (incubator)
21
+
- Vector API (second incubator)
22
+
- context-specific deserialization filters
23
+
24
+
### TODO
25
+
To add the screenshots for Java 17 features to README for quick illustration. Screenshots are already in `assets` directory.
25
26
26
-
## Java 14 API
27
-
New features available in Java SE 14. These are the features added to JLS in the versions later to Java SE 11. Most frequently used features are:
27
+
## What's available in Java 14 API
28
+
The additional and formally introduced features available in Java 14. These are the features added to JLS in the versions later to version 11. Most frequently used features are:
28
29
- Enhanced `instanceof` operator for safe type conversion: Now use `if (obj instanceof String str)` instead of `if (obj instanceof String)` to get a pre-cooked variable `str` of type `String`, for example, to utilise inside the concerned code block.
- More explanatory NullPointerException message. Run the super-method `main` of `NullPointerExceptionPlus` to get:
@@ -62,26 +63,28 @@ New features available in Java SE 14. These are the features added to JLS in the
62
63

63
64

64
65
65
-
## Java 17 API
66
-
New features available in Java SE 17. These are the features added to JLS in the versions later to Java SE 17. Most frequently used features are listed below:
67
-
- restore always-Strict floating-point semantics: It ensures same results of floating-point calculations on every platform.
68
-
- enhanced pseudo-random number generators: class java.util.Random implements interface java.util.random.RandomGenerator. Such new implementations of pseudo random number generators allow for better support for stream-based programming.
69
-
- new macOS rendering pipeline
70
-
- macOS/AArch64 port
71
-
- deprecate the Applet API for removal
72
-
- strongly encapsulate JDK internals
73
-
- pattern matching for switch (preview)
74
-

75
-
- remove RMI activation
76
-
- sealed classes
77
-
- remove the experimental AOT and JIT compilers
78
-
- deprecate the Security Manager for removal
79
-
- Foreign Function and Memory API (incubator)
80
-
- Vector API (second incubator)
81
-
- context-specific deserialization filters
66
+
## Java 11 API
67
+
The nice features available in Java 11 over our good old friend Java 8. Most notable additions are:
68
+
- Method `T[] Collection.toArray(IntFunction<T[]> generator )` to use instead of first generating a stream and then invoking `A[] Stream.toArray(IntFunction<A[]> generator);`
- A number of new methods foster our most-loved class `java.lang.String`. These are: `isBlank()`, `strip()`, `stripLeading()`, `stripTrailing()`, `repeat(intCount)`
85
+

86
+

82
87
83
-
//TODO
84
-
To insert the screenshots into README for quick illustration. Screenshots are already in `assets` directory.
85
88
86
89
## Java Core Snippets
87
90
Code fragments and executable programs testing many variants and conditions with standard language features of Java API. Some of the `.java` files here are:
@@ -106,4 +109,8 @@ Guidelines on the preferred usage of major Java 8 features and API methods:
106
109
- Java 8 DateTime code samples.md
107
110
- Java 8 Functional Interfaces in Java API.md
108
111
- Java Concurrency API.md
109
-
- Java Stream collector-s methods.md
112
+
- Java Stream collector-s methods.md
113
+
114
+
## Notes
115
+
- PoC implementations of the gists will keep on adding gradually.
0 commit comments