Explore various approaches to converting Optional to ArrayList.
Also find me here:
Baeldung Author
Wynn Teo
I’m Wynn, a Software Developer with a 10 years of experience. I began my journey in the tech world during my university days in Singapore, and coding has been my passion ever since. I enjoy learning, especially when it comes to all things tech. The journey of gaining knowledge is what keeps me going.
Here's what I've written (so far):
Baeldung on Java
- All
- Spring Data (5)
- Java Concurrency (5)
- JPA (4)
- Java IO (3)
- Persistence (2)
- Java Collections (2)
- Data (2)
- Testing (1)
- Networking (1)
- Java Dates (1)
- Java Array (1)
- Core Java (1)
- Algorithms (1)
Inheritance vs. Composition in JPA
Filed under JPA
Explore the fundamental differences between inheritance and composition in JPA entity modeling.
How to Implement Elvis Operator in Java 8
Filed under Core Java
Implement the Elvis operator in Java 8 using the Optional class and ternary operator.
Get Nextval From Sequence With Spring JPA
Filed under JPA, Spring Data
Explore a few approaches for fetching the next value from a database sequence using Spring Data JPA.
Introduction to Simple Java Mail
Filed under Java IO
Explore the process of setting up Simple Java Mail and learn how to send emails, including attachments and HTML content, handle exceptions, and more.
Join Two Tables Using jOOQ
Filed under Persistence
Explore various types of joins available in jOOQ.
Querying JSONB Columns Using Spring Data JPA
Filed under JPA, Spring Data
Explore various approaches for querying JSONB columns using Spring Data JPA
Get List of Entity From Database in Hibernate
Filed under Persistence
Explore a few techniques for retrieving lists of entities from a database using Hibernate
Guide to ExecutorService vs. CompletableFuture
Filed under Java Concurrency
Explore two essential Java classes for handling asynchronous tasks: ExecutorService and CompletableFuture.
Checking if a Date Object Equals Yesterday
Filed under Java Dates
Explore various approaches for determining whether a given date object falls on yesterday.
Refresh and Fetch an Entity After Save in JPA
Filed under JPA, Spring Data
Explore various strategies and techniques to effectively refresh and fetch entities after saving in JPA.
Finding the Majority Element of an Array in Java
Filed under Java Array
Explore different approaches to finding the majority element within an array. Learn about their time and space complexities.
Query Hints in Spring Data JPA
Filed under Spring Data
Explore query hints in Spring Data JPA and learn how they can help optimize database queries.
@DataJpaTest and Repository Class in JUnit
Filed under Spring Data, Testing
Learn how to use @DataJpaTest to test our JPA repository in JUnit.
Difference Between thenApply() and thenApplyAsync() in CompletableFuture
Filed under Java Concurrency
Explore the functionalities and differences between the thenApply() and thenApplyAsync() methods in Java’s CompletableFuture.
CompletableFuture runAsync() vs. supplyAsync() in Java
Filed under Java Concurrency
Learn about two essential methods offered by Java’s CompletableFuture, explore their differences, use cases, and when to choose one over the other
Understanding Kafka InstanceAlreadyExistsException in Java
Filed under Data
Explore the significance of the InstanceAlreadyExistsException within Apache Kafka and how to mitigate the issue.
View Kafka Headers in Java
Filed under Data
Learn about commonly used Kafka headers and learn how to view and extract them using Java.
Find the First Non-repeating Element of a List
Filed under Algorithms, Java Collections
Learn a few approaches to finding the first non-repeating element in a list, each with its advantages and considerations.
Creating a Custom URL Connection
Filed under Networking
Explore the process of creating a custom URL connection in Java to overcome the limitations associated with the default URLConnection class.
Translating Space Characters in URLEncoder
Filed under Java IO
Learn the fundamentals of URL encoding in Java focusing on the URLEncoder class for encoding spaces into URL-safe formats.
CountDownLatch vs. Semaphore
Filed under Java Concurrency
Explore the differences between CountDownLatch and Semaphore and discuss when to use each.
Read and Write Files in Java Using Separate Threads
Filed under Java Concurrency, Java IO
Explore the utilization of separate threads for efficient file handling in Java.