Calculate Number of Weeks between Two Dates in Java
How to do in JAVA
by Lokesh Gupta
1w ago
In this Java tutorial, learn the different approaches for calculating the number of weeks between two dates using the Java Date and Time API. The post Calculate Number of Weeks between Two Dates in Java appeared first on HowToDoInJava ..read more
Visit website
Displaying Name of the Day of the Week in Java
How to do in JAVA
by Lokesh Gupta
2w ago
In this Java tutorial, we will explore various methods to display the name of the day of the week, catering to different scenarios and requirements. Note that we should be careful of using the int values assigned to weekdays as they differ from method to method. 1. Display the Day of the Week using Java ... Read more The post Displaying Name of the Day of the Week in Java appeared first on HowToDoInJava ..read more
Visit website
Split Date-time Range into Equal Intervals in Java
How to do in JAVA
by Lokesh Gupta
2w ago
In this Java date-time tutorial, we’ll explore how to split a date-time range into equal intervals. Conceptually, splitting a date-time range into equal intervals involves dividing the entire range into smaller, equally-sized sub-ranges. In short, we need to determine the start and end points of each sub-range. 1. Splitting Date-time Range to N Equal Intervals ... Read more The post Split Date-time Range into Equal Intervals in Java appeared first on HowToDoInJava ..read more
Visit website
Java StopWatch: Calculating Execution Time
How to do in JAVA
by Lokesh Gupta
2w ago
Learn to implement and use a StopWatch in Java with a custom implementation for simple uses and Apache Commons StopWatch class for advanced uses. The post Java StopWatch: Calculating Execution Time appeared first on HowToDoInJava ..read more
Visit website
Get Current Quarter, Start, and End Date in Java
How to do in JAVA
by Lokesh Gupta
1M ago
Java programs using new Java 8 APIs to obtain the information of the current quarter, as well as the start and end date of the current quarter. The post Get Current Quarter, Start, and End Date in Java appeared first on HowToDoInJava ..read more
Visit website
Convert between Month Name and Month Number in Java
How to do in JAVA
by Lokesh Gupta
1M ago
Learn to get the Month information in either number or name, and to convert it into another using Java Date-time API and simple examples. The post Convert between Month Name and Month Number in Java appeared first on HowToDoInJava ..read more
Visit website
Java Date Format with Day Period (morning, afternoon, evening and night)
How to do in JAVA
by Lokesh Gupta
1M ago
Since Java 16, we can use the additional parameter [B] to format a date-time object with the date-time information using the DateTimeFormatter class. The post Java Date Format with Day Period (morning, afternoon, evening and night) appeared first on HowToDoInJava ..read more
Visit website
Java Math.abs() and Math.absExact() with Examples
How to do in JAVA
by Lokesh Gupta
1M ago
This Java tutorial explores what are absolute values, the overflow, and underflow problems of Math.abs() method, and how Java 15 Math.absExact() solves them. The post Java Math.abs() and Math.absExact() with Examples appeared first on HowToDoInJava ..read more
Visit website
Java String Concatenation Performance: Under the Hood
How to do in JAVA
by Lokesh Gupta
1M ago
This article delves into the differences between these ways and highlights how Java optimizes the bytecode to make the String concatenation faster. The post Java String Concatenation Performance: Under the Hood appeared first on HowToDoInJava ..read more
Visit website
Checking if Two Strings are Isomorphic
How to do in JAVA
by Lokesh Gupta
1M ago
Two string literals are considered isomorphic if we can map every character of the first string to every character of the second string in a one-to-one fashion. The post Checking if Two Strings are Isomorphic appeared first on HowToDoInJava ..read more
Visit website

Follow How to do in JAVA on FeedSpot

Continue with Google
Continue with Apple
OR