JDK 20 |
---|
20Resolved |
Support for obtaining the file extension of a file path's name is added via a new default method `java.nio.file.Path::getExtension`. Some examples: | File Name String | Extension | |------------------|-----------| | "foo.tar.gz" | "gz" | | "foo.bar" | "bar" | | "foo." | "" | | "foo" | `null` | | ".bar" | `null` |