Java
-
Java: Convert java.util.Date to calendar
Using Calendar#setTime method, we can set the calendar time to given date. Find the below working application....
-
Java: Get milliseconds from given date and time
Step 1: Get the SimpleDateFormat instance from given date pattern. SimpleDateFormat simpleDateFormat = new SimpleDateFormat(...
-
Java: Get time in milliseconds from Date, Calendar and ZonedDateTime
Get time in milliseconds from Date Date#getTime() method return the time in milliseconds. Date date = new Date(); long...
-
Top 10 Applications Built Using Java
Java is a general-purpose programming language widely used to build desktop and mobile applications. Java applications are compatible with...
-
Top Java Blogs Weekly: Best of 35/2022
Best of Top Java Blogs, year 2022, week 35
-
Quiz yourself: Creating records within a Java sealed-type hierarchy
A record type is always implicitly final, so it cannot be extended by either a regular class or a record. You’re designing an IoT...
-
Renovate, a Dependabot alternative
I won’t introduce Dependabot. Lots and lots of developers use it daily on GitHub. I do use it as well. However, it suffers from two...
-
How and when to use var to declare local variables in Java? Example Tutorial
Hello guys, In this series of new features of Java 10 articles, today, I am going to talk about probably the most popular and most useful, the...
-
Lombok @Data and @NonNull Annotations Examples in Java
Hello Java programmers, if you have been doing professional Java development, you may have heard about Lombok library, one of the most popular...
-
How to merge two sorted array in Java? Example Tutorial
Hello guys, if you want to learn how to merge two sorted arrays in Java then you have come to the right place. Earlier, I have shown you how...
-
How to implement Selection Sort in Java? Example Tutorial
Hello guys, if you are wondering how to implement selection sort algorithm in Java then you are at the right place. In the past, I have taught...
-
How to convert an Array to HashSet in Java? Example Tutorial
The array was there in Java before the Collection framework makes its entry in JDK 1.4, hence, you will find several legacy codes, which accept an...
-
List.of(), Set.of() and Map.of() Example in Java - How to create Immutable Map, List, and Set in Java
Hello guys, this is my first article in Java 9 features on this blog, and today you'll learn about my favorite feature "factory methods...
-
Difference between HashMap, LinkedHashMap and TreeMap in Java with Example
Hello guys, if you are wondering what is difference between HashMap, TreeMap, and LinkedHashMap in Java and when to use them then you are at the...
-
ArrayList.contains(), size(), clear, asList(), subList(), toArray(), and isEmpty() Example in Java
Java ArrayList Example ArrayList in Java is one of the most popular Collection classes. ArrayList is an implementation of the List...
-
How to Read User Input and Password in Java from command line? Console Example
Hello guys, if you are wondering how to take user input from command prompt in Java like username and password then don't worry. Java provides...
-
How to replace characters and substring in Java? String.replace(), replaceAll() and replaceFirst() Example
One of the common programming tasks is to replace characters or substring from a String object in Java. For example, you have a String "...
-
Where Is Python Used In The Real World?
Hello guys, if you are wondering where is Python used in real world before you decide whether to learn Python programming language or not...
-
How to use @PropertySource Annotation in Java and Spring? Property Source Example
Hello Java developers, if you are wondering What is property source in Spring Framework and how to use @PropertySource annotation then you have...