1+ package pl .mperor .lab .java ;
2+
3+ import org .junit .jupiter .api .Assertions ;
4+ import org .junit .jupiter .api .Test ;
5+ import sun .misc .Unsafe ;
6+
7+ /// Java 23 (September 2024)
8+ /// [JDK 23](https://openjdk.org/projects/jdk/23)
9+ ///
10+ /// - STANDARD FEATURES:
11+ /// - 467: Markdown Documentation Comments
12+ /// - 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal
13+ /// - 474: ZGC: Generational Mode by Default
14+ ///
15+ /// - PREVIEW & INCUBATOR:
16+ /// - 476: Module Import Declarations (Preview)
17+ /// - 455: Primitive Types in Patterns, instanceof, and switch (Preview)
18+ /// - 466: Class-File API (Second Preview)
19+ /// - 473: Stream Gatherers (Second Preview)
20+ /// - 482: Flexible Constructor Bodies (Second Preview)
21+ /// - 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)
22+ /// - 480: Structured Concurrency (Third Preview)
23+ /// - 481: Scoped Values (Third Preview)
24+ /// - 469: Vector API (Eighth Incubator)
25+ public class Java23 {
26+
27+ /// This is a **Markdown** JavaDoc (starts with ///).
28+ /// Markdown Documentation Comments are described in this [JEP](https://openjdk.org/jeps/467).
29+ /// It supports *italic*, **bold**, and `code` formatting.
30+ ///
31+ /// As well:
32+ /// - code block:
33+ /// ```java
34+ /// void main(){
35+ /// println("Unnamed entry point!");
36+ ///}
37+ ///```
38+ /// - table:
39+ ///
40+ /// | JDK | Year |
41+ /// |------|------|
42+ /// | 17 | 2021 |
43+ /// | 21 | 2023 |
44+ /// | 25 | 2025 |
45+ @ Test
46+ public void testMarkdownDocumentationComments () {
47+ }
48+
49+ @ Test
50+ public void testSunMiscUnsafeDeprecated () {
51+ Assertions .assertThrows (SecurityException .class , Unsafe ::getUnsafe );
52+ }
53+
54+ }
0 commit comments