Explain Codes LogoExplain Codes Logo

Java

Counting Line Numbers in Eclipse

java
eclipse
plugins
code-metrics

Java.util.date to XMLGregorianCalendar

java
xmlgregoriancalendar
timezone
joda-time

Check whether a String is not Null and not Empty

java
string-checks
best-practices
null-safety

What is an efficient way to implement a singleton pattern in Java?

java
singleton
design-patterns
best-practices

How to install the JDK on Ubuntu Linux

java
jdk
ubuntu
environment-setup

How to set time zone of a java.util.Date?

java
time-zone
date-parsing
joda-time

How to create a temporary directory/folder in Java?

java
temporary-directory
exception-handling
file-io

Is there a Newline constant defined in Java like Environment.Newline in C#?

java
newline
file-handling
text-manipulation

Omitting one Setter/Getter in Lombok

java
lombok
getters
setters

Finding Number of Cores in Java

java
multi-threading
performance
core-count

Java string split with "." (dot)

java
string-split
regex
edge-cases

How to get the first element of the List or Set?

java
collections
optional
error-handling

A quick and easy way to join array elements with a separator (the opposite of split) in Java

java
string-joining
utility-tools
best-practices

How to remove duplicate white spaces in string using Java?

java
string-manipulation
regex
performance

How to create a directory in Java?

java
directory-creation
exception-handling
nio

Can I catch multiple Java exceptions in the same catch clause?

java
multi-catch
exception-handling
code-organization

Initializing a Guava ImmutableMap

java
immutablemap
builder
performance

How to convert byte array to string and vice versa?

java
byte-array
string-conversion
utf-8

Should a retrieval method return `null` or throw an exception when it can't produce the return value?

java
null-checks
error-handling
optional

Android RecyclerView addition & removal of items

java
recyclerview
item-management
click-events