Explain Codes LogoExplain Codes Logo

Java

What is a safe way to create a Temp file in Java?

java
temp-files
nio2
file-attributes

Converting String array to java.util.List

java
arrays
collections
java-8

Should a "static final Logger" be declared in UPPER-CASE?

java
naming-convention
best-practices
logging

What's the difference between @Component, @Repository & @Service annotations in Spring?

java
annotations
spring
aop

What is the difference between List and ArrayList?

java
polymorphism
arraylist
best-practices

Multi-project test dependencies with gradle

java
gradle
multi-project
dependencies

Mockito: how to verify method was called on an object created within a method?

java
mocking
test-driven-development
dependency-injection

Intellij IDEA generating serialVersionUID

java
serialversionuid
troubleshooting
plugins

Standard concise way to copy a file in Java?

java
file-copying
filechannel
error-handling

C# Java HashMap equivalent

java
hashmap
exception-handling
custom-dictionary

What are enums and why are they useful?

java
enums
object-oriented
design-patterns

Java 8 Streams: Multiple Filters vs. Complex Condition

java
streams
performance
filters

Java Hashmap: How to get key from value?

java
hashmap
bidirectional
generics

Easiest way to convert a List to a Set in Java

java
set-operations
collections
java-8

How do I update an entity using spring-data-jpa?

java
spring-data-jpa
transactions
custom-queries

How do I use optional parameters in Java?

java
optional-parameters
varargs
clean-code

Hashmap with multiple values under the same key

java
hashmap
collections
generics

When to use StringBuilder in Java

java
stringbuilder
performance
readability

In Java, how do I check if a string contains a substring (ignoring case)?

java
string-manipulation
regex
performance

How to scroll to the bottom of a RecyclerView? scrollToPosition doesn't work

java
recyclerview
smooth-scrolling
adapter-data-observer