Article
Dates are something we encounter in everyday life, whether they're used for calendars, scheduling appointments, or even remembering birthdays. Naturally, when working with dates we will often need to know if a certain date comes before or after another, or if they represent the same calendar date. In this article,...
Anđela Niketić
In this tutorial, we'll be taking a look at how to convert a JSON String into a Java Map using Jackson, an extremely popular data-binding library for Java. Specifically, we'll be working with this JSON object: { "Task 1" : "In_Progress", "Task 2" : "Done&...
David Landup
In Java, there is a distinct difference between null, empty, and blank Strings. An empty string is a String object with an assigned value, but its length is equal to zero. A null string has no value at all. A blank String contains only whitespaces, are is neither empty nor...
Selena Hocevar
In this tutorial, we'll take a look at how to generate random integers in a specific range in Java. We'll be taking a look at several approaches, including core Java and third-party solutions: Random.ints() Random.nextInt() Math.random() SecureRandom.nextInt() ThreadLocalRandom.nextInt() SplittableRandom.ints() Note: For each approach, we'll...
Map implementations in Java represent structures that map keys to values. A Map cannot contain duplicate keys and each can at most be mapped to one value. The Map<K,V> implementations are generic and accept any K (key) and V (value) to be mapped. The Map interface...
Branko Ilic
Java is a type-safe programming language. Type safety ensures a layer of validity and robustness in a programming language. It is a key part of Java's security to ensure that operations done on an object are only performed if the type of the object supports it. Type safety dramatically reduces...
Rayven Yor Esplanada
In this article we'll be taking a look at how to read and write CSV files in Kotlin, specifically, using Apache Commons. Apache Commons Dependency Since we're working with an external library, let's go ahead and import it into our Kotlin project. If you're using Maven, simply include the commons-csv...
Guest Contributor
A stream represents a sequence of elements and supports different kind of operations that lead to the desired result. The source of these elements is usually a Collection or an Array, from which data is provided to the stream. Streams differ from collections in several ways; most notably in that...
K-Means is one of the simplest and most popular clustering algorithms in data science. It divides data based on its proximity to one of the K so-called centroids - data points that are the mean of all of the observations in the cluster. An observation is a single record of...
Darinka Zobenica
© 2013-2025 Stack Abuse. All rights reserved.