Explain Codes LogoExplain Codes Logo

Java

Stringbuilder vs String Concatenation in toString() in Java

java
optimizations
string-concatenation
stringbuilder

Difference Between @Mock and @InjectMocks

java
mockito
unit-testing
test-automation

How do I get a class instance of generic type T?

java
reflection
generics
type-erasure

How do I generate random integers within a specific range in Java?

java
random-number-generation
java-8
performance

No appenders could be found for logger(log4j)?

java
log4j-configuration
logging-best-practices
java-logging

How do I hide .class files from the Open Resource dialog in Eclipse?

java
eclipse-configuration
resource-filters
working-sets

String contains - ignore case

java
performance
best-practices
null-checks

How to read all files in a folder from Java?

java
file-handling
java-nio-file
try-with-resources

When I run mockito test occurs WrongTypeOfReturnValue Exception

java
mockito
testing
best-practices

Retrieve only static fields declared in Java class

java
reflection-api
java-8
best-practices

Remove ✅, 🔥, ✈ , ♛ and other such emojis/images/signs from Java strings

java
regex-pattern
string-transformation
unicode-filtering

How to set the java.library.path from Eclipse

java
java-configuration
eclipse-settings
native-libraries

How do I reverse an int array in Java?

java
array-manipulation
java-8
performance

Java 8 method references: provide a Supplier capable of supplying a parameterized result

java
lambda
supplier
java-8

Difference between FetchType LAZY and EAGER in Java Persistence API?

java
lazy-loading
eager-loading
hibernate

Invoking a static method using reflection

java
reflection
method-invocation
java-reflection-api

Is it possible to cast a Stream in Java 8?

java
stream-engineering
java-8
best-practices

How to pass an ArrayList to a varargs method parameter?

java
array
varargs
java-best-practices

Java: convert List to a join()d String

java
string-concatenation
stream-api
java-8-features

Java ArrayList: How to add elements at the beginning

java
collections
best-practices
performance