Learn how to validate email addresses in Java using regular expressions.
Baeldung Editor
Jonathan Cook
Jonathan has more than 10 years of experience as a Senior Software Engineer with a focus on Java. He is particularly passionate about testing and ensuring the quality of the systems he is responsible for. He has contributed to several open source projects and can now be found in Spain looking after the ESA science archives.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Spring Boot (11)
- Java (10)
- Core Java (7)
- Testing (5)
- HTTP Client-Side (5)
- Java IO (4)
- JPA (4)
- Data (4)
- Spring Web (3)
- Spring Persistence (3)
- Spring (3)
- Persistence (3)
- Java Dates (3)
- Java Concurrency (3)
- Java Collections (3)
- Java Array (3)
- Jackson (3)
- REST (2)
- NoSQL (2)
- Maven (2)
- Java String (2)
- Java Numbers (2)
- JVM (2)
- Guava (2)
- DevOps (2)
- Architecture (2)
- Spring Security (1)
- Spring MVC (1)
- Spring Data (1)
- Security (1)
- Reactive (1)
- Jakarta EE (1)
- Groovy (1)
- Algorithms (1)
Validate String as Filename in Java
Filed under Java IO
Learn how to validate if a given string has a valid filename for the OS, using Java.
A Guide to Auto-Commit in JDBC
Filed under Persistence
Learn what auto-commit mode is and how to use it correctly with Java and JDBC.
Difference Between MVC and MVP Patterns
Filed under Architecture
Learn about the differences between the MVC and MVP Patterns.
Linking to an External URL in Javadoc
Filed under Java
Learn how to use Javadoc to link to external urls.
CQL Data Types
Filed under NoSQL
Learn about some of the different data types of the Apache Cassandra database.
Enabling Logging for Apache HttpClient
Filed under HTTP Client-Side
Learn how to enable logging for the Apache HttpClient.
Private Constructors in Java
Filed under Core Java
Learn about private constructors in Java.
How to Get the Number of Threads in a Java Process
Filed under Java Concurrency
Learn how to check the number of threads created by a Java process.
Download a Binary File Using OkHttp
Filed under HTTP Client-Side
Learn how to download a binary file using the OkHttp library.
Max-Http-Request-Header-Size in Spring Boot
Filed under Spring Boot
Learn how to set and use the max-http-header-size property in a Spring Boot 2.x application.
Java – Path vs File
Filed under Java IO
Learn about the differences between the File and Path classes in Java.
Inserting Null Into an Integer Column Using JDBC
Filed under Persistence
Learn how to store null values in a database using plain JDBC.
Spring Boot Error ApplicationContextException
Filed under Spring Boot
Learn how to solve the ApplicationContextException in Spring Boot.
Finding All Classes in a Java Package
Filed under Java
Learn how to find all classes in a Java package at runtime.
Spring Conditional Annotations
Filed under Spring Boot
Learn about the Spring @Conditional annotation.
Deserialization Vulnerabilities in Java
Filed under Core Java
Learn how an attacker can use deserialization in Java to exploit a system.
Multipart Request Handling in Spring
Filed under Spring Boot
Learn how to send multipart HTTP requests using Spring Boot.
Using an Interface vs. Abstract Class in Java
Filed under Core Java
Learn when to use an interface and when to use an abstract class in Java.
Spring Boot Cache with Redis
Filed under NoSQL, Spring Data
Learn how to configure Redis as the data store for Spring Boot cache.
Introduction to Debezium
Filed under Data
Learn about CDC using Debezium and Java.
Advise Methods on Annotated Classes With AspectJ
Filed under Java
Learn how to write trace logging output when calling methods of configured classes using AspectJ.
Set a Timeout in Spring 5 Webflux WebClient
Filed under HTTP Client-Side, Spring Web
Learn how to configure timeout settings for our WebClient using Spring Webflux.
Spring Bean Names
Filed under Spring
Learn about different Spring bean naming strategies.
Spring Boot With JavaServer Pages (JSP)
Filed under Spring Boot
Learn how to build a web application with Spring Boot and JSP.
“HttpMessageNotWritableException: No converter found for return value of type”
Filed under Jackson, REST, Spring MVC
Learn about Spring’s HttpMessageNotWritableException: “No converter found for return value of type” exception.
Guide to Implementing the compareTo Method
Filed under Core Java
Learn about how to implement the compareTo method using core Java.
Spring RestTemplate Exception: “Not enough variables available to expand”
Filed under HTTP Client-Side, Spring Web
Learn about Spring’s RestTemplate Not enough variables available to expand IllegalArgumentException.
Spring Boot: Customize the Jackson ObjectMapper
Filed under Jackson, Spring Boot
Learn how to configure the serialization and deserialization options for Jackson using Spring Boot.
Behavioral Patterns in Core Java
Filed under Architecture, Core Java
Learn about some of the most common bahavioral design patterns using Java.
ArrayList vs. LinkedList vs. HashMap in Java
Filed under Java Collections
Learn about the differences between three of the most common Java Collections: ArrayList, LinkedList, and HashMap
Java AES Encryption and Decryption
Filed under Security
Learn how to implement AES encryption and decryption using the Java Cryptography Architecture.
JPA CascadeType.REMOVE vs orphanRemoval
Filed under JPA
Learn about the difference between JPA CascadeType.REMOVE and orphanRemoval for deleting entities.
Ignoring Fields With the JPA @Transient Annotation
Filed under JPA
Learn how to ignore fields using the JPA @Transient annotation in Java.
Java (String) or .toString()?
Filed under Java String
Learn about the differences between String casting and executing the toString() method in Java.
Understanding the & 0xff Value in Java
Filed under Core Java
Learn how to use the 0xff value with the bitwise AND operator in Java.
How to Remove a Prefix From Strings in Groovy
Filed under Groovy
Learn how to remove the prefix from a string using Groovy.
The Spring @ConditionalOnProperty Annotation
Filed under Spring Boot
Learn all about the Spring @ConditionalOnProperty annotation.
Assert Two Lists for Equality Ignoring Order in Java
Filed under Java Collections, Testing
Learn how to make order agnostic comparison of lists when writing unit tests.
Health Indicators in Spring Boot
Filed under Spring Boot
Learn all about Health Indicators in Spring Boot.
What Is the Difference Between DVM and JVM?
Filed under JVM
Learn about the differences between the Java Virtual Machine (JVM) and the Dalvik Virtual Machine (DVM).
Optional Dependency in Maven
Filed under Maven
Learn now to use Maven’s optional tag.
Set Field Value With Reflection
Filed under Java
Learn how to set values of private fields in Java using the Reflection API.
Hypermedia Serialization With JSON-LD
Learn how to serialize and deserialize JSON-LD using Jackson.
Determine if an Object Is of Primitive Type
Filed under Core Java
Learn how to determine if an object is of primitive type using Java.
Flyway Repair With Spring Boot
Filed under Persistence, Spring Boot
Learn how to recover from a failed Flyway migration using Spring Boot.
Convert an Array of Primitives to a List
Filed under Java Array
Learn how to convert an array of primitives to a List of objects of the corresponding type.
Why Are Local Variables Thread-Safe in Java
Filed under Java Concurrency
Learn why local variables are thread-safe in Java.
How Can I Resize an Image Using Java?
Learn how to resize (scale) an image using Java.
Guide to Apache BookKeeper
Filed under Data
Learn how to use Apache BookKeeper.
Easy Ways to Write a Java InputStream to an OutputStream
Learn how to write a Java InputStream to a Java OutputStream.
Test a Mock JNDI Datasource with Spring
Filed under Spring Persistence, Testing
Learn how to test a mock JNDI datasource using the Spring Framework and the Simple-JNDI library.
Getting the Week Number From Any Date
Filed under Java Dates
Learn how to get the week number for a given date in Java.
Injecting Spring Beans into Unmanaged Objects
Filed under Spring Persistence
Learn how to inject a Spring bean into an ordinary object.
Rate Limiting a Spring API Using Bucket4j
Filed under REST, Spring Boot
Learn how to use Bucket4j to rate limit a Spring REST API.
Validate Phone Numbers With Java Regex
Filed under Java
Learn how to validate different formats of phone numbers using regular expressions.
Java-R Integration
Filed under Java
Learn about some of the most common ways of integrating R code into Java.
Spring Security Custom Logout Handler
Filed under Spring Security
Learn how to implement a Custom Logout Handler using Spring Security.
Guide to AtomicStampedReference in Java
Filed under Java Concurrency
Learn how to use the AtomicStampedReference class in Java.
Writing Templates for Test Cases Using JUnit 5
Filed under Testing
Learn how to create a test template using JUnit 5.
Guide to the Number Class in Java
Filed under Java Numbers
Learn what the Java Number class does and what methods it contains.
Using Guava’s MapMaker
Filed under Guava
Learn how to use Guava’s MapMaker class to create maps with weak references.
Conditional Flow in Spring Batch
Filed under Spring
Learn how to create Spring Batch jobs with conditional flow.
Introduction to Alibaba Arthas
Filed under DevOps
Learn how to monitor, profile, and troubleshoot our Java applications using Alibaba Arthas.
Testing Spring Boot @ConfigurationProperties
Filed under Spring Boot, Testing
Learn how to test configuration classes in Spring Boot that rely on the @ConfigurationProperties annotation.
Connect Java to a MySQL Database
Filed under Spring Persistence
Learn several techniques to connect to a MySQL database from Java.
Check for null Before Calling Parse in Double.parseDouble
Filed under Java Numbers
Learn how to check for null before converting a string to a double using Double.parseDouble.
How to Lock a File in Java
Filed under Java IO
Learn about different file locking techniques using the Java NIO Library.
Arrays.deepEquals
Filed under Java Array
In this tutorial learn all about how to use the Java Arrays deepEquals method.
Java Text Blocks
Filed under Java String
Learn how to use the Java Text Blocks feature, incorporated as a standard feature since JDK 15.
Difference Between Java Matcher find() and matches()
Filed under Java
Learn about the differences between the find() and matches() methods of the Matcher class.
How to Set the JVM Time Zone
Filed under JVM
Learn about several ways we can modify the time zone of the JVM using Java.
Maximum Subarray Problem in Java
Filed under Algorithms, Java Array
Discover two approaches for solving the maximum subarray problem using Java.
Using Maven Behind a Proxy
Filed under Maven
Learn how to configure Maven to work from behind a proxy.
Error Handling with Spring AMQP
Filed under Spring
Learn about different ways of handling errors using Spring AMQP with RabbitMQ.
Circular Linked List Java Implementation
Filed under Java Collections
Learn how to implement a circular linked list in Java.
Checking if Two Java Dates Are on the Same Day
Filed under Java Dates
Learn several different ways to check if two Date objects have the same day.
Get the Current Date Prior to Java 8
Filed under Java Dates
Learn how to get the current Date in Java using several techniques prior to Java 8.
Mapping a Single Entity to Multiple Tables in JPA
Filed under JPA
Learn how to map a single Java entity to multiple database tables using JPA.
File System Mocking with Jimfs
Filed under Testing
Learn how to use Jimfs, an in-memory file system that implements the Java NIO API.
JPA Annotation for the PostgreSQL TEXT Type
Filed under JPA
Learn how to manage the PostgreSQL TEXT type using the annotations defined by the JPA specification.
Guide to Tomcat Manager Application
Filed under DevOps
Learn how to use the Tomcat Manager App – a web application packaged with the Tomcat server for managing our deployed web applications.
Validations for Enum Types
Filed under Jakarta EE, Java
Learn how to build validations for enums using Java custom annotations.
Simultaneous Spring WebClient Calls
Filed under HTTP Client-Side, Reactive, Spring Web
Learn how to make simultaneous HTTP requests using The Spring WebClient.
Baeldung on Linux
- All
- Scripting (9)
- Files (5)
- Administration (4)
- File Editing (2)
- Docker (2)
- Search (1)
- Processes (1)
- Networking (1)
- Filesystems (1)
- File Searching (1)
Determine if a Process Runs Inside a Container
Learn how to determine if a process is running inside a Linux container.
Guide to Desktop Entry Files in Linux
Filed under Files
Learn about what Linux desktop entry files are, why they are useful, and how they function.
When and How to Use the dd Command
Filed under Files
Learn how to use the dd command on Linux.
Bash – Using History Efficiently
Filed under Scripting
Learn how to use Bash history to work more efficiently.
Run vi Editor Inside Docker Container
Filed under Docker, File Editing
Learn how to use the vi command inside a Docker container.
Count All the Lines of Code in Directory
Filed under File Searching
Learn how to count all the lines of code in a directory in Linux.
Get the Path of a Linux Command
Filed under Scripting
Learn how to get the path of a Linux command.
Downloading a Tarball from GitHub
Filed under Files
Learn how to download a GitHub repository tarball in Linux.
Display Specific Columns From a File in Linux
Filed under Scripting
Learn how to display specific columns from a file using Linux scripting.
File Editing: Appending a Non-Existent Line to a File
Learn various techniques for appending a line to a file only if that file doesn’t have such a line in it already.
How to Check Logs Using journalctl
Filed under Administration
Learn how to use the journalctl tool to check, filter, and clean up the logs on a Linux system.
Run a Java Application as a Service on Linux
Filed under Administration
Learn how to run a Java Application as a service on Linux.
Difference Between .bashrc, .bash-profile, and .profile
Filed under Administration, Scripting
Learn about the startup files .bashrc, .bash-profile, and .profile and their differences.
The Meaning of IFS in Bash Scripting
Filed under Scripting
Learn how to use the Internal Field Separator shell variable in Bash.
What Does cd – Do?
Filed under Filesystems
Learn how to use dash as an argument of the cd command.
How To Write a Bash Script That Answers Interactive Prompts
Filed under Scripting
Learn how to use different methods to answer interactive prompts from a Linux Bash script.
Exclude Multiple Patterns With Grep
Filed under Search
Learn how to reverse the match for multiple patterns using the grep command.
Keeping SSH Session Alive
Filed under Networking
Learn how to keep SSH sessions alive in Linux.
How to Delete a File Whose Name Begins With “-“
Filed under Files
Learn how to delete a file whose name begins with "-" using the find and rm commands.
Free Command in Linux
Filed under Administration
Learn how to monitor memory usage in Linux using the free command.
How to Use the cd Command in Bash Scripts
Filed under Scripting
Learn how to use the cd command in Linux Bash Scripts.
How to Find and Replace Text in a File
Filed under File Editing
Learn how to find and replace text in a file using the Linux command line.
Guide to the Linux read Command
Filed under Scripting
Learn how to use the Linux read command to handle user input from the command line.
Baeldung on Scala
- All
- Scala Collections (3)
- Scala Basics (3)
- Scala Core (2)
- Functional Programming (2)
- Scala OOP (1)
- Libraries (1)
- Akka (1)
Introduction to Cats Effects
Filed under Functional Programming
Learn how to use Cats Effects 3 to control effects and maximize composability in our Scala code.
Case Objects vs Enumerations in Scala
Filed under Functional Programming
Learn about the differences between Case Objects and Enumerations in Scala.
Folding Lists in Scala
Filed under Scala Collections
Learn how to fold lists using Scala.
How To Use Structural Types in Scala
Filed under Scala Basics
Learn how to use Structural Types in Scala.
A Guide to Scala Maps
Filed under Scala Collections
Learn all about Scala’s Map data type.
How to Convert Binary to Text Data in Scala
Filed under Scala Basics
Learn how to convert binary input streams into text using Scala.
A DSL for Writing “20 seconds” in Scala
Filed under Scala Basics
Learn how to implement A DSL for Writing “20 seconds” in Scala.
Implicit Conversions
Filed under Scala Core
Learn about implicit conversions in Scala.
Implicit Classes
Filed under Scala Core
Learn about implicit classes using Scala.
Typed Akka: The Actor Model Done Right
Filed under Akka
In this tutorial learn about Typed Akka using Scala.
Classes and Objects in Scala
Filed under Scala OOP
Learn about Scala Classes and Objects.
Introduction to Optics in Scala Using Monocle
Filed under Libraries
Learn how to use the well-known Scala optics library Monocle.
A Guide to Scala Tuples
Filed under Scala Collections
Learn all about Scala Tuples.
Baeldung on Computer Science
- All
- Artificial Intelligence (2)
- Algorithms (2)
- Trees (1)
- Networking (1)
- Data Structures (1)
Why Is an OPTIONS Request Sent?
Filed under Networking
Learn why an OPTIONS HTTP request is sent.
Reconstructing a Tree From Its Depth-First Traversals
Filed under Algorithms, Data Structures, Trees
Learn how to reconstruct a tree from its depth-first traversals.
Publicly Available Spam Filter Training Sets
Filed under Artificial Intelligence
Learn about different types of approaches to spam detection.
Genetic Algorithms vs Neural Networks
Filed under Algorithms, Artificial Intelligence
Learn about the differences between genetic algorithms and neural networks.
Baeldung on Kotlin
- All
- Libraries (1)
Introduction to TornadoFX
Filed under Libraries
Learn how to set up and use TornadoFX with Kotlin.