From 03123b0133bf4ccaa19f8b9bf372f16122b2ea17 Mon Sep 17 00:00:00 2001 From: danthe1st Date: Fri, 28 Jun 2024 18:43:54 +0200 Subject: [PATCH 1/7] update enums article --- .../04_classes_objects/01_enums.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md index 651a2ea..42d7591 100644 --- a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md +++ b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md @@ -17,7 +17,7 @@ toc: - Precautions {precautions} - Conclusion {conclusion} description: "Working with enums." -last_update: 2023-09-29 +last_update: 2024-06-28 author: ["DanielSchmid"] ---   @@ -32,7 +32,7 @@ No instances of the enum can be created outside of enum constants. ```java public enum DayOfWeek { - // enum constant are listed here: + // enum constants are listed here: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY } ``` @@ -74,8 +74,8 @@ switch (someDay) { With [Switch Expressions](id:lang.classes-objects.switch-expression), the compiler can check whether all values of the enum are handled. If any possible value is missing in a switch expression, there will be a compiler error. -This is referred to as Exhaustiveness and can also be achieved with regular classes -through [Sealed Classes](https://openjdk.org/jeps/409). +This is referred to as exhaustiveness checking and can also be achieved with regular classes +through [Sealed Classes](https://openjdk.org/jeps/409) and [Patternmatching](/learn/pattern-matching/#switch). ```java DayOfWeek someDay = DayOfWeek.FRIDAY; @@ -99,7 +99,8 @@ Arguments to the constructor are passed in parenthesis after the declaration of ```java public enum DayOfWeek { - MONDAY("MON"), TUESDAY("TUE"), WEDNESDAY("WED"), THURSDAY("THU"), FRIDAY("FRI"), SATURDAY("SAT"), SUNDAY("SUN"); + MONDAY("MON"), TUESDAY("TUE"), WEDNESDAY("WED"), THURSDAY("THU"), FRIDAY("FRI"), + SATURDAY("SAT"), SUNDAY("SUN"); private final String abbreviation; @@ -140,9 +141,9 @@ This allows for comparing instances of enums as well as sorting or searching. ```java public void compareDayOfWeek(DayOfWeek dayOfWeek){ int comparison = dayOfWeek.compareTo(DayOfWeek.WEDNESDAY); - if ( comparison < 0) { + if (comparison < 0) { System.out.println("It's before the middle of the work week."); - } else if(comparison > 0){ + } else if (comparison > 0) { System.out.println("It's after the middle of the work week."); } else { System.out.println("It's the middle of the work week."); @@ -210,6 +211,6 @@ and reading these configuration files in the program in cases like this.   ## Conclusion -Enums provide a simple and safe way of representing a fixed set of constants while keeping most of the flexibilities of classes. They are a special type of class that can be used to write code that is elegant, readable, and maintainable, and work well with other newer modern features like [Switch Expressions](id:lang.classes-objects.switch-expression). Another special class is the Record class introduced in Java 19. Visit our [Records tutorial](id:lang.records) to learn more. +Enums provide a simple and safe way of representing a fixed set of constants while keeping most of the flexibilities of classes. They are a special type of class that can be used to write code that is elegant, readable, maintainable and works well with other modern Java features like [Switch Expressions](id:lang.classes-objects.switch-expression). Another special class is the Record class introduced in Java 19. Visit our [Records tutorial](id:lang.records) to learn more. To learn more about enums, visit the [`java.lang.Enum`](javadoc:Enum) javadoc. \ No newline at end of file From ac01cc32ae484053e11314de2b79103595e3b591 Mon Sep 17 00:00:00 2001 From: danthe1st Date: Mon, 8 Jul 2024 20:28:19 +0200 Subject: [PATCH 2/7] address review comments --- .../04_classes_objects/01_enums.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md index 42d7591..3704c74 100644 --- a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md +++ b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md @@ -17,7 +17,7 @@ toc: - Precautions {precautions} - Conclusion {conclusion} description: "Working with enums." -last_update: 2024-06-28 +last_update: 2024-07-08 author: ["DanielSchmid"] ---   @@ -71,11 +71,11 @@ switch (someDay) { } ``` -With [Switch Expressions](id:lang.classes-objects.switch-expression), +With [switch expressions](id:lang.classes-objects.switch-expression), the compiler can check whether all values of the enum are handled. If any possible value is missing in a switch expression, there will be a compiler error. This is referred to as exhaustiveness checking and can also be achieved with regular classes -through [Sealed Classes](https://openjdk.org/jeps/409) and [Patternmatching](/learn/pattern-matching/#switch). +through [sealed classes](https://openjdk.org/jeps/409) and [patternmatching](/learn/pattern-matching/#switch). ```java DayOfWeek someDay = DayOfWeek.FRIDAY; From 0557e2f00c55306d8ad13f2494d4353db0787c46 Mon Sep 17 00:00:00 2001 From: danthe1st Date: Mon, 8 Jul 2024 21:21:11 +0200 Subject: [PATCH 3/7] add missing space --- .../04_classes_objects/01_enums.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md index 3704c74..88a6381 100644 --- a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md +++ b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md @@ -75,7 +75,7 @@ With [switch expressions](id:lang.classes-objects.switch-expression), the compiler can check whether all values of the enum are handled. If any possible value is missing in a switch expression, there will be a compiler error. This is referred to as exhaustiveness checking and can also be achieved with regular classes -through [sealed classes](https://openjdk.org/jeps/409) and [patternmatching](/learn/pattern-matching/#switch). +through [sealed classes](https://openjdk.org/jeps/409) and [pattern matching](/learn/pattern-matching/#switch). ```java DayOfWeek someDay = DayOfWeek.FRIDAY; From 463e48d534f17878ac99354afc4e8062606e907c Mon Sep 17 00:00:00 2001 From: abhishekabramaina <90707533+abhishekabramaina@users.noreply.github.com> Date: Thu, 5 Dec 2024 00:22:25 +0530 Subject: [PATCH 4/7] fixed the typo described in issue #96 (#129) --- .../03_converting_foreach_with_if.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/03_refactoring_to_functional_style/03_converting_foreach_with_if.md b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/03_refactoring_to_functional_style/03_converting_foreach_with_if.md index 4a20eb5..3dcff3d 100644 --- a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/03_refactoring_to_functional_style/03_converting_foreach_with_if.md +++ b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/03_refactoring_to_functional_style/03_converting_foreach_with_if.md @@ -76,7 +76,7 @@ for(String name: names) { For the functional style, the `filter` method of `Stream` becomes a direct replacement of the imperative style `if`. The `filter` method will allow an element in the collection to pass through to the next stage in the functional pipeline if the predicate, passed in as a lambda, to the `filter()` method evaluates to `true`; otherwise, the value is discarded from further processing. -Let's conver the previous code to functional style: +Let's convert the previous code to functional style: ```java List names = List.of("Jack", "Paula", "Kate", "Peter"); From 3ee75ddfcafb1e7078b8ae79cbd7bc7e42d63d94 Mon Sep 17 00:00:00 2001 From: Marit van Dijk Date: Mon, 16 Dec 2024 09:23:49 +0100 Subject: [PATCH 5/7] Fix incorrect shortcut for Toggle Breakpoint. (#131) * Fix incorrect shortcut for Toggle Breakpoint. Some additional small grammar fixes. * Fix incorrect shortcut for Toggle Breakpoint. Some additional small grammar fixes. --- .../02_building-with-intellij-idea.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/pages/learn/01_tutorial/01_your-first-java-app/02_building-with-intellij-idea.md b/app/pages/learn/01_tutorial/01_your-first-java-app/02_building-with-intellij-idea.md index cae4f20..18d4958 100644 --- a/app/pages/learn/01_tutorial/01_your-first-java-app/02_building-with-intellij-idea.md +++ b/app/pages/learn/01_tutorial/01_your-first-java-app/02_building-with-intellij-idea.md @@ -31,7 +31,7 @@ author: ["MaritvanDijk"]   ## Overview -An IDE (Integrated Development Environment) allows you to quickly create applications, by combining a source-code editor with the ability to compile and run your code, as well as integration with build, test and debug tools, version control systems, and so on. Finally, an IDE will let you search and navigate your codebase in ways your file system won’t. +An IDE (Integrated Development Environment) allows you to quickly create applications by combining a source-code editor with the ability to compile and run your code, as well as integration with build, test and debug tools, version control systems, and so on. Finally, an IDE will let you search and navigate your codebase in ways your file system won’t. One of the [most widely used integrated development environments (IDEs)](https://www.jetbrains.com/lp/devecosystem-2023/java/#java_ide) for Java is IntelliJ IDEA. Its user-friendly interface, rich feature set, and vast ecosystem make it an ideal environment for beginners to learn and grow as developers. In this tutorial you’ll learn how to use some of its features to simplify your development process and accelerate your learning curve with Java programming. @@ -45,7 +45,7 @@ Note that IntelliJ IDEA is available in two editions: For this tutorial, you can download the Community Edition. For more information on installing IntelliJ IDEA on your OS, see [the documentation](https://www.jetbrains.com/help/idea/installation-guide.html#standalone). -When you launch IntelliJ IDEA for the first time, you’ll see the **Welcome** screen. From here, you create a new project, open an existing project, or get a project from a version control system (like GitHub). +When you launch IntelliJ IDEA for the first time, you’ll see the **Welcome** screen. From here, you can create a new project, open an existing project, or get a project from a version control system (like GitHub). [![Welcome screen](/assets/images/intellij-idea/welcome-screen.png)](/assets/images/intellij-idea/welcome-screen.png) @@ -58,7 +58,7 @@ We can create a new project from the **Welcome** screen, or we can go to **File [![New Project menu](/assets/images/intellij-idea/new-project-menu.png)](/assets/images/intellij-idea/new-project-menu.png) -In the **New Project** wizard, make sure that **Java** is selected on the left hand side, and give your project a name (for example, `java-demo`). +In the **New Project** wizard, make sure that **Java** is selected on the left-hand side, and give your project a name (for example, `java-demo`). Next, we'll select a **Build system**. IntelliJ IDEA supports both Maven and Gradle; the most used build systems for Java. A build tool, like Maven or Gradle, helps you to build your project, and manage any dependencies (like additional libraries) that you want to use in your Java code. Using a build tool will also make it easier to share your application and build it on a different machine. If you don't want to use either, you can use the IntelliJ build system. In this tutorial, let’s create a Maven project. [![New Project](/assets/images/intellij-idea/new-project.png)](/assets/images/intellij-idea/new-project.png) @@ -133,7 +133,7 @@ IntelliJ IDEA will manage the formatting of your code as you write it. If needed A major benefit of using an IDE is that you can directly run your code without having to first manually compile it on the command line. -You can run the `HelloWorld` application directly from the editor, by clicking the green run button in the gutter near the class declaration, or using the shortcut **⌃⇧R** (on macOS) or **Ctrl+Shift+F10** (on Windows/Linux). +You can run the `HelloWorld` application directly from the editor, by clicking the green Run button in the gutter near the class declaration, or using the shortcut **⌃⇧R** (on macOS) or **Ctrl+Shift+F10** (on Windows/Linux). Alternatively, we can run our application using the green Run button in the top right corner, or using the shortcut **⌃R** (on macOS) or **Ctrl+F10** (on Windows/Linux) to run the latest file. @@ -145,7 +145,7 @@ To edit your run configurations, select the configuration in the run/debug confi [![Edit Configurations](/assets/images/intellij-idea/edit-configurations.png)](/assets/images/intellij-idea/edit-configurations.png) -The popup **Run/Debug Configurations** appears and there you can modify JVM options, add program arguments and many more. +The popup **Run/Debug Configurations** appears, and there you can modify JVM options, add program arguments, and many more. [![Run / Debug Configuration](/assets/images/intellij-idea/run-config.png)](/assets/images/intellij-idea/run-config.png) @@ -173,7 +173,7 @@ We can select a **Testing library** in the **Create test** popup. [![Create test](/assets/images/intellij-idea/create-test.png)](/assets/images/intellij-idea/create-test.png) -IntelliJ IDEA supports multiple testing libraries, including [JUnit 5](https://junit.org/junit5/), which is the [most used testing library for Java developers](https://www.jetbrains.com/lp/devecosystem-2023/java/#java_unittesting). If JUnit 5 is not part of your project yet, IntelliJ IDEA will note “JUnit5 library not found in the module”. Click **Fix** to have IntelliJ IDEA fix this for you. +IntelliJ IDEA supports multiple testing libraries, including [JUnit 5](https://junit.org/junit5/), which is the [most used testing library for Java developers](https://www.jetbrains.com/lp/devecosystem-2023/java/#java_unittesting). If JUnit 5 is not part of your project yet, IntelliJ IDEA will note “JUnit5 library not found in the module.” Click **Fix** to have IntelliJ IDEA fix this for you. Note that the JUnit 5 dependency `junit-jupiter` is added to the `pom.xml` in the `` section. To make sure the dependencies work correctly in your project, **Load Maven Changes** by clicking the popup in the top right corner, or using the shortcut **⇧⌘I** (on macOS) or **Ctrl+Shift+O** (on Windows/Linux). @@ -212,16 +212,16 @@ public class CalculatorTest { ``` In our test class, we can select **Run All Tests** (**⌃⇧R** on macOS or **Ctrl+Shift+F10** on Windows/Linux). -In our example, we see that the second tests fails. We expected to get the value `0` as the average of an empty array, but got `NaN` (not a number) instead. Let's find out why, using the debugger. +In our example, we see that the second test fails. We expected to get the value `0` as the average of an empty array, but got `NaN` (not a number) instead. Let's find out why, using the debugger.   ## Debugging We might want to see how our code runs, either to help us understand how it works and/or when we need to fix a bug or failing test, like the one above. We can run our code through the [debugger](https://www.jetbrains.com/help/idea/debugging-code.html) to see the state of our variables at different times, and the call stack - the order in which methods are called when the program executes. To do so, we must first add a [breakpoint](https://www.jetbrains.com/help/idea/using-breakpoints.html) to the code. -To add a breakpoint, click the gutter at the line of code where you want execution to stop. Alternatively, place the caret at the line and press **⌃F8** (on macOS) or **Ctrl+F8** (on Windows/Linux). We can run our test or application using the **Debug** option; either by right-clicking the **Run** button in the gutter and selecting the **Debug** option from the list, or by selecting the **Debug** button at the top right. +To add a breakpoint, click the gutter at the line of code where you want execution to stop. Alternatively, place the caret at the line and press **⌘F8** (on macOS) or **Ctrl+F8** (on Windows/Linux). We can run our test or application using the **Debug** option; either by right-clicking the **Run** button in the gutter and selecting the **Debug** option from the list, or by selecting the **Debug** button at the top right. -Execution will stop at the breakpoint, so we can investigate the state of our application. We can see the current values of variables and objects. We can evaluate an expression, to see its current value and look at more details. We can even change the expressions to evaluate different results. We can continue execution by either stepping into a method to see what happens inside a called method (using the shortcut **F7**, or the corresponding button in the **Debug** tool window) or stepping over a line to go to the next line even if a method is called (using the shortcut **F8**, or the corresponding button in the **Debug** tool window), depending on what we’re interested in. Finally, we can resume the program to finish the execution of the test. +Execution will stop at the breakpoint, so we can investigate the state of our application. We can see the current values of variables and objects. We can evaluate an expression to see its current value and look at more details. We can even change the expressions to evaluate different results. We can continue execution by either stepping into a method to see what happens inside a called method (using the shortcut **F7**, or the corresponding button in the **Debug** tool window) or stepping over a line to go to the next line even if a method is called (using the shortcut **F8**, or the corresponding button in the **Debug** tool window), depending on what we’re interested in. Finally, we can resume the program to finish the execution of the test. Let's debug the failing test from the previous section. In the code, place a breakpoint on line 4. Run the failing test through the debugger. Step over the code until you get to line 8, and observe the values of the variables. When we get to line 8, select `sum / numbers.length`, right-click to open the context menu and select **Evaluate Expression**. Press **Enter** to evaluate the selected expression. We see that `sum / numbers.length` results in a `java.lang.ArithmeticException: / by zero`. The empty array has a length of `0` and Java does not allow dividing by zero. When we evaluate `(double) sum / numbers.length` we get the result `NaN`. We expected `0`, so our test fails. @@ -269,12 +269,12 @@ Pull up the refactoring menu to see what is possible, using the shortcut **⌃T* We can add documentation to our code. IntelliJ IDEA provides completion for documentation comments, which is enabled by default. Type `/**` before a declaration and press **Enter**. IntelliJ IDEA auto-completes the documentation comment for you. -IntelliJ IDEA provides a way for you to easily understand and read JavaDoc comments by selecting _Reader Mode_. **Toggle Reader Mode** in the editor using **^⌥Q** (on macOS) or **Ctrl+Alt+Q** (on Windows/Linux). Right-click the icon in the gutter to select **Render All Doc Comments** if you want all comments to show in reader mode. +IntelliJ IDEA provides a way for you to easily understand and read Javadoc comments by selecting _Reader Mode_. **Toggle Rendered View** in the editor using **^⌥Q** (on macOS) or **Ctrl+Alt+Q** (on Windows/Linux). Right-click the icon in the gutter to select **Render All Doc Comments** if you want all comments to show in reader mode.   ## Searching and navigating -IntelliJ IDEA also helps us by providing ways to navigate around our codebase, for example by going backwards and forwards between files, finding usages and declarations, finding interfaces and their implementations, viewing recently opened files and location, or even opening a window by name. +IntelliJ IDEA also helps us by providing ways to navigate around our codebase, for example, by going backwards and forwards between files, finding usages and declarations, finding interfaces and their implementations, viewing recently opened files and location, or even opening a window by name. One popular way to search is [Search Everywhere](https://www.jetbrains.com/help/idea/searching-everywhere.html) (using **Shift** twice). Search everywhere allows you to search your project files and directories, as well as your project settings and IntelliJ IDEA settings. From 457e0dfadf952a3384cfd9d6918bf6f1ab820bcc Mon Sep 17 00:00:00 2001 From: dan1st Date: Fri, 24 Oct 2025 12:49:54 +0200 Subject: [PATCH 6/7] fix wrong JDK version for record introduction (#138) fixes #137 --- .../04_classes_objects/01_enums.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md index 129676c..f00eafe 100644 --- a/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md +++ b/app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects/01_enums.md @@ -212,6 +212,6 @@ and reading these configuration files in the program in cases like this.   ## Conclusion -Enums provide a simple and safe way of representing a fixed set of constants while keeping most of the flexibilities of classes. They are a special type of class that can be used to write code that is elegant, readable, maintainable and works well with other modern Java features like [switch expressions](id:lang.classes-objects.switch-expression). Another special class is the Record class introduced in Java 19. Visit our [records tutorial](id:lang.records) to learn more. +Enums provide a simple and safe way of representing a fixed set of constants while keeping most of the flexibilities of classes. They are a special type of class that can be used to write code that is elegant, readable, maintainable and works well with other modern Java features like [switch expressions](id:lang.classes-objects.switch-expression). Another special class is the Record class introduced in JDK 16. Visit our [records tutorial](id:lang.records) to learn more. To learn more about enums, visit the [`java.lang.Enum`](javadoc:Enum) javadoc. \ No newline at end of file From 5bde67032f9c9d8230a3700d2d700da97bd595d2 Mon Sep 17 00:00:00 2001 From: dan1st Date: Fri, 24 Oct 2025 12:50:33 +0200 Subject: [PATCH 7/7] minor changes to modern IO article (#121) --- .../04_mastering-the-api/02_modern_io/01_modern_io.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/pages/learn/01_tutorial/04_mastering-the-api/02_modern_io/01_modern_io.md b/app/pages/learn/01_tutorial/04_mastering-the-api/02_modern_io/01_modern_io.md index 5bd0496..1dd5dfd 100644 --- a/app/pages/learn/01_tutorial/04_mastering-the-api/02_modern_io/01_modern_io.md +++ b/app/pages/learn/01_tutorial/04_mastering-the-api/02_modern_io/01_modern_io.md @@ -14,6 +14,7 @@ toc: - The Files API {the-files-api} - Conclusion {conclusion} last_update: 2024-04-24 +last_review: 2024-08-05 description: "This article focuses on tasks that application programmers are likely to encounter, particularly in web applications, such as reading and writing text files, reading text, images, JSON from the web, and more." author: ["CayHorstmann"] --- @@ -155,8 +156,9 @@ String result = new String(bytes); Or transfer the data to an output stream: ```java -OutputStream out = Files.newOutputStream(path); -in.transferTo(out); +try(OutputStream out = Files.newOutputStream(path)) { + in.transferTo(out); +} ``` Note that no loop is required if you simply want to read all bytes of an input stream. @@ -216,7 +218,7 @@ Here are the other methods for traversing directory entries: * An overloaded version of [`Files.walk`](javadoc:Files.walk(Path,depth)) lets you limit the depth of the traversed tree. * Two [`Files.walkFileTree`](javadoc:Files.walkFileTree(Path)) methods provide more control over the iteration process, by notifying a [`FileVisitor`](javadoc:FileVisitor) when a directory is visited for the first and last time. This can be occasionally useful, in particularly for emptying and deleting a tree of directories. See the tutorial [Walking the File Tree](id:api.javaio.file_sytem.walking_tree) for details. Unless you need this control, use the simpler [`Files.walk`](javadoc:Files.walk(Path)) method. * The [`Files.find`](javadoc:Files.find(Path)) method is just like [`Files.walk`](javadoc:Files.walk(Path)), but you provide a filter that inspects each path and its [`BasicFileAttributes`](javadoc:BasicFileAttributes). This is slightly more efficient than reading the attributes separately for each file. -* Two [`Files.newDirectoryStream(Path)`](javadoc:Files.newDirectoryStream(Path)) methods yields [`DirectoryStream`](javadoc:DirectoryStream) instances, which can be used in enhanced `for` loops. There is no advantage over using [`Files.list`](javadoc:Files.list(Path)). +* Two [`Files.newDirectoryStream(Path)`](javadoc:Files.newDirectoryStream(Path)) methods yield [`DirectoryStream`](javadoc:DirectoryStream) instances, which can be used in enhanced `for` loops. There is no advantage over using [`Files.list`](javadoc:Files.list(Path)). * The legacy [`File.list`](javadoc:File.list()) or [`File.listFiles`](javadoc:File.listFiles()) methods return file names or [`File`](javadoc:File) objects. These are now obsolete. ### Working with ZIP Files