Java Tutorials & Protips

Remove the last character of a string in Java

Learn about different ways to remove the last character of a string in Java.

Java

How to reverse the elements of a stream in Java

A protip to learn how to reverse the elements of a stream object in Java.

Java

How to extract digits from a string in Java

A simple guide to learn how to extract digits from a string in Java.

Java

How to read and parse a CSV file in Java

A detailed guide to learn how to read and parse a CSV file using core Java, OpenCSV, and Apache Commons CSV.

JavaCSV

Calculate difference between two dates in Java

A complete guide to learn how to calculate the difference between two dates in Java using new date and time API as well as legacy date API.

Java

Check if a string contains a substring in Java

Learn about six different ways to check if a specific string contains a substring in Java.

Java

Convert Java Object to and from XML using JAXB

A quick guide to learn how to convert a Java object to its XML representation and vice versa using JAXB.

JavaXML

Reading and Writing XML in Java

A complete guide to learn how to read and write XML in Java using JAXB and DOM Parser.

JavaXML

How to generate random numbers in Java

A quick article to learn how to generate random numbers in a range in Java.

Java

How to Convert String to LocalDateTime in Java

A quick tutorial to learn how to convert a string to an instance of LocalDateTime in Java.

Java

How to Convert String to LocalDate in Java

A quick tutorial to learn how to convert a string to an instance of LocalDate in Java.

Java

How to format LocalDateTime in Java

A quick tutorial to learn how to format an instance of LocalDateTime in Java.

Java

How to format LocalDate in Java

A quick tutorial to learn how to format an instance of LocalDate in Java.

Java

How to format a date to string in Java

A complete guide to learn how to format a date to a string in Java 8 and beyond.

Java

How to add days to a date in Java

A quick tutorial to learn how to add days to a date using Java 8 new date and time API as well as the legacy Date and Calendar API.

Java

How to compare dates in Java

A comprehensive guide to learn how to compare dates using Java 8 new date and time API as well as legacy Date and Calendar API.

Java

How to get the UNIX timestamp in Java

A quick article to learn how to get the UNIX timestamp in Java.

Java

How to get current timestamp in Java

A quick article to learn how to get the current timestamp in Java.

Java

How to convert a string to date in Java

A comprehensive guide to learn how to convert a string to a date using Java 8 new date and time API, legacy Date class as well as external libraries.

Java

How to get current date and time in Java

A detailed tutorial to learn how to get current date and time in Java using legacy classes as well as Java 8 new date and time API.

Java

✨ Learn to build modern web applications using JavaScript and Spring Boot

I started this blog as a place to share everything I have learned in the last decade. I write about modern JavaScript, Node.js, Spring Boot, core Java, RESTful APIs, and all things web development.

The newsletter is sent every week and includes early access to clear, concise, and easy-to-follow tutorials, and other stuff I think you'd enjoy! No spam ever, unsubscribe at any time.