Java’s new yield keyword makes it easier to provide a returned result from switch statements. We look at how it works and how it can help ensure we cover all possible cases.
Also find me here:
Baeldung Author
Alex Tighe
Alex Tighe is a senior software engineer. He has a wide range of experience developing software for everything from experimental neuroscience to NASA satellite image processing to global investment banking software. In his free time, he enjoys reading, traveling, and building Lego sets.
Here's what I've written (so far):
Baeldung on Java
- All
- Testing (1)
- Spring Boot (1)
- Spring (1)
- Java IO (1)
- Core Java (1)
Loading Multiple YAML Configuration Files in Spring Boot
Filed under Spring Boot
Spring can load YML into memory for us, making it easy to inject data into our running application. We look at how to split that YML across multiple files, rather than keep it all in a single application.yml.
A Quick Guide to @DirtiesContext
Learn how to use Spring’s @DirtiesContext annotation for testing
How to Avoid the Java FileNotFoundException When Loading Resources
Filed under Java IO
Java programs cannot easily load files once they have been compiled into the resources of a JAR or WAR file. Here’s how to load resources reliably.
Baeldung on Linux
- All
- Files (5)
- Processes (3)
- File Editing (3)
- Administration (3)
- Scripting (2)
- File Viewing (2)
- Search (1)
- Filesystems (1)
Guide to the Linux ln Command
Filed under Files
Explore a few ways to use the ln command in Linux to create hard and soft links to files and directories.
How to Delete All Lines in a vi or vim Buffer
Filed under File Editing
Learn a few different ways to delete the contents of a buffer in both vi and vim
How to Toggle Multiple Comment Lines in Vim
Filed under File Editing
Explore a few ways to comment and uncomment lines in vim.
How To Split a Screen Session Vertically
Filed under Administration
Learn how to add a vertical split in a region in a GNU screen session.
Limiting the Output of grep
Filed under File Viewing
Learn how to limit the output of the grep command in Linux to isolate the text you’re looking for.
How to Clear Word Highlighting in Vim
Filed under File Viewing
We can search for text within vim and see highlighting for all occurrences. We look at a few ways to clear this highlight.
How to Clear Logs in Linux
Filed under Administration
Learn how to can clear logs and configure the system not to keep them around for too long.
How Do I Use mktemp?
Filed under Files
The mktemp command can help us create a temporary file or directory in the correct location on a Linux system. We look at how it works and some tips for using it.
How to Write Bash Variable Contents to a File
Filed under File Editing, Scripting
Learn multiple ways to write the contents of a Bash variable to a file in Linux.