Explain Codes LogoExplain Codes Logo

Java

How can I clear or empty a StringBuilder?

java
performance
best-practices
garbage-collection

How can I create a Java 8 LocalDate from a long Epoch time in Milliseconds?

java
date-and-time
java-8
localdate

How to capture a list of specific type with mockito

java
mockito
argument-captor
test-verification

How do I import the javax.servlet / jakarta.servlet API in my Eclipse project?

java
maven
dependency-management
servlet-api

Java 8 LocalDate Jackson format

java
date-formatting
jackson-serialization
localdate

How to get a file's Media Type (MIME type)?

java
mime-type
file-management
stream-management

What is the difference between an int and an Integer in Java and C#?

java
autoboxing
performance
best-practices

Why doesn't JUnit provide assertNotEquals methods?

java
assertions
junit
testing

Mockito matcher and array of primitives

java
mockito
unit-testing
argument-matchers

Simple way to find if two different lists contain exactly the same elements?

java
list-comparison
equality-checks
performance-implications

How to sort a List/ArrayList?

java
comparators
lambda
collections

Could not reserve enough space for object heap

java
memory-management
jvm-configuration
performance-tuning

Places where JavaBeans are used?

java
encapsulation
serialization
data-transfer

What is the best Java email address validation method?

java
email-validation
best-practices
regular-expressions

What's the difference between a Future and a Promise?

java
async-programming
future
promise

How to create an array of 20 random bytes?

java
randomness
security
performance

Calendar date to yyyy-MM-dd format in Java

java
date-formatting
java-8
simpledateformat

Getting "cannot find symbol" in Java project in IntelliJ

java
intellij-settings
maven-settings
java-compiler

Add context path to Spring Boot application

java
spring-boot
server-configuration
context-path

Best way of invoking getter by reflection

java
reflection
getter-methods
best-practices