Explain Codes LogoExplain Codes Logo

Java

How to convert Calendar to java.sql.Date in Java?

java
date-conversion
calendar
sql-date

What is the best way to implement constants in Java?

java
best-practices
object-oriented-principles
constants

Mockito.any() pass Interface with Generics

java
mockito
generics
type-safety

How to convert hashmap to JSON object in Java

java
json-serialization
gson
jackson

Can enums be subclassed to add new elements?

java
enum-inheritance
best-practices
design-patterns

Should I initialize variable within constructor or outside constructor

java
best-practices
constructor
initialization

Static Initialization Blocks

java
static-initialization
complex-assignments
static-blocks

How to find all unused classes in IntelliJ IDEA?

java
intellij-idea
code-cleanup
inspections

Differences between Ant and Maven

java
build-tools
dependency-management
project-management

How can I pass a parameter to a Java Thread?

java
thread-safety
parameter-passing
java-threads

Is Java a Compiled or an Interpreted programming language?

java
just-in-time-compilation
ahead-of-time-compilation
bytecode-execution

How do I fix "The expression of type List needs unchecked conversion..."?

java
unchecked-conversion
type-safety
generics

In java how to get substring from a string till a character c?

java
substring
string-manipulation
java-8

How do I get a platform-dependent new line character?

java
string-formatting
best-practices
platform-dependency

How to efficiently remove all null elements from a ArrayList or String Array?

java
collections
best-practices
performance

Type safety: Unchecked cast

java
type-safety
unchecked-cast
generics

Java Round up Any Number

java
typecasting
precision
math-ceil

Difference between break and continue statement

java
loop-control
best-practices
programming-principles

What do I use now that Handler() is deprecated?

java
async-execution
handler-deprecation
concurrency-api

How to serialize an object into a string

java
serialization
deserialization
base64