Explain Codes LogoExplain Codes Logo

Java

How can I get the current date and time in UTC or GMT in Java?

java
date-time
joda-time
timezone

Pretty-print JSON in Java

java
pretty-printing
json
gson

Using two values for one switch case statement

java
switch-case
string-objects
java-se-7

Measure execution time for a Java method

java
execution-time
profiling
performance

Java URL encoding of query string parameters

java
url-encoding
best-practices
character-sets

What is the difference between JDK and JRE?

java
jdk
jre
java-development

Make a negative number positive

java
math-abs
biginteger
ternary-operator

Convert list to array in Java

java
toarray
concurrency
autoboxing

How to convert a byte array to a hex string in Java?

java
byte-array
hex-string
performance

How do I make the method return type generic?

java
generics
type-safety
method-overloading

How do I make a delay in Java?

java
scheduledexecutorservice
lambda
thread-sleep

How to randomize two ArrayLists in the same fashion?

java
randomization
data-integrity
fisher-yates

Creation timestamp and last update timestamp with Hibernate and MySQL

java
localdatetime
hibernate
timestamps

What does 'synchronized' mean?

java
synchronized
thread-safety
java-memory-model

How to dockerize a maven project? and how many ways to accomplish it?

java
dockerization
maven
kubernetes

Java Serializable Object to Byte Array

java
serialization
exception-handling
objectmapper

How to parse JSON in Java

java
json-parsing
jackson
error-handling

What's the difference between map() and flatMap() methods in Java 8?

java
flatmap
map
streams

How can I turn a List of Lists into a List in Java 8?

java
list-flattening
streams
functional-programming

File to byte[] in Java

java
file-io
memory-management
apache-commons