We look at how to use TimeUnit to convert durations between units and avoid creating our own hard-to-read math code.
Also find me here:
Baeldung Author
Mateusz Szablak
Application Developer - Java/Spring/Oracle/Microservices as a prior backend technology stack. Crossover knowledge of different programming languages and additional frameworks. Solid theoretical background. Interested in algorithms, problem-solving, and design patterns usage. Author of technology guides and articles. Job experience - involved in maintaining and developing new features in big-industry projects (telco & banking). After work hours - gaming passionate - playing, also developing (mainly Android) and 3D modeling/graphics.
Here's what I've written (so far):
Baeldung on Java
- All
- Testing (2)
- Java IO (2)
- Spring Data (1)
- Programming (1)
- Java Dates (1)
- Java (1)
- Data (1)
Creating a Test Suite With JUnit
Filed under Testing
Learn two different ways for creating test suites with JUnit.
TRUNCATE TABLE in Spring Data JPA
Filed under Spring Data
A quick and practical guide to truncating table in Spring Data JPA.
SpringRunner vs MockitoJUnitRunner
Filed under Testing
Learn the key differences between SpringRunner and MockitoJUnitRunner and understand their purpose.
Constructing a Relative Path From Two Absolute Paths in Java
Filed under Java IO
Learn how to construct a relative path from two absolute paths in Java.
Difference Between == and equals() in Java
Filed under Java
Learn about the reference and value equality checks in Java, the differences between them, and understand when to use which check.
Finding the Last Row in an Excel Spreadsheet From Java
Filed under Data
Learn how to find the last row in an Excel spreadsheet using Java and Apache POI.
Git for Beginners: The Definitive Practical Guide
Filed under Programming
A step-by-step guide to Git, this article discusses the most commonly used commands. Learn the basics, the Git workflow, branching and even some advanced techniques like modifying your commit history.
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.
Baeldung on Ops
- All
- Docker (2)
Mounting a Single File in a Volume Using Docker
Filed under Docker
Learn multiple ways for mounting a single file in a volume using Docker.
Difference Between Expose and Ports in Docker Compose
Filed under Docker
Explore the differences between expose and ports when using Docker Compose.