Explore how to convert between Date and Instant, discuss precision differences, and provide fully working JUnit 5 tests to validate the behavior.
Also find me here:
Baeldung Author
Neetika Khandelwal
An enthusiastic computer science engineer with experience working in Java applications. I have interest in solving real world problems through my knowledge in DSA and passionate about learning new technologies. I also develop technical contents to share knowledge and provide learning content.
Here's what I've written (so far):
Baeldung on Java
- All
- Java Array (7)
- Java Collections (5)
- Java List (4)
- Algorithms (4)
- Spring Boot (3)
- Java Streams (3)
- Java Numbers (3)
- Java Map (3)
- JSON (3)
- Testing (2)
- Java String (2)
- Java (2)
- Spring (1)
- Persistence (1)
- Networking (1)
- Logging (1)
- Java Web (1)
- Java Dates (1)
- Data (1)
- Core Java (1)
Resolving Spring Boot Exception: The Elements Were Left Unbound
Filed under Spring Boot
Learn that the ‘elements were left unbound’ Spring Boot exception is a deliberate design choice to enforce strict configuration correctness and prevents subtle runtime bugs.
Why We Should Not Mock Collections With Mockito
Filed under Java Collections, Testing
Mocking Java collections is rarely a good idea and can lead to brittle tests, unrealistic behavior, and unnecessary coupling to implementation details.
Casting JSONArray to Int Array in Java
Filed under Java Array, JSON
A practical walk through to converting a JSONArray to an int array in Java.
Finding the Collection of All IDs in a Collection of Entities
Filed under Java Collections, Persistence
Explore different ways to collect IDs from a collection of entity objects..
Resolving Jsonexception: Jsonobject Text Must Begin With ‘{‘ in Java
Filed under JSON
Explore why the ‘JSONObject text must begin with ‘{‘ at character 0’ exception occurs, what it means, and how to resolve it, with clear examples.
Get Host Name With Port From a HTTP or HTTPS Request in Java
Filed under Java Web
Explore different ways to get the hostname with a port from an HTTP request in Java.
Getting the List of All Keys Under a JSONObject Using GSON
Filed under JSON
Build a simple recursive utility to extract all keys from a JsonObject using GSON
DataLoader for Batch Processing
Filed under Data
A quick tutorial on using DataLoader to batch database calls in Java.
Baeldung on Computer Science
- All
- Programming (1)
- Data Structures (1)
How to Implement a Queue Using Two Stacks?
Filed under Data Structures
Learn two approaches to simulating a FIFO queue using two LIFO stacks.
High-Level Design vs. Low-Level Design
Filed under Programming
Explore the differences between high-level and low-level designs in software engineering.