Does Java pass by reference or pass by value?

Does Java pass by reference or pass by value?

You've probably heard that Java passes by value, but what matters is how well you understand the concept and the code. Find out what happens when you pass an object reference to a method in Java.

Comparing Java objects with equals() and hashcode()

Comparing Java objects with equals() and hashcode()

What is the contract between equals() and hashcode()? Learn how these methods work together when comparing Java objects.

Polymorphism and inheritance in Java

Polymorphism and inheritance in Java

Challenge yourself, with this brain-teasing introduction to Java method invocation in polymorphic method calls.

Thread behavior in the JVM

Thread behavior in the JVM

The JVM does what it wants to do, so how can you predict the order of thread execution?

String comparisons in Java

String comparisons in Java

Have you ever wondered how Java's String methods, keywords, and operators process comparisons in the String pool? Here's your chance to find out!

Sorting with Comparable and Comparator in Java

Sorting with Comparable and Comparator in Java

Comparable or Comparator—which should it be? Learn how to choose the correct interface for the sorting algorithm you need.

Method overloading in the JVM

Method overloading in the JVM

Test your mind with the first Java Challenger in a new series. Can you outthink the Java virtual machine?