String Equality

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.

Answer:

The last one on the chain.

The other activations on the chain are awaiting results before proceeding. (The inactive circles have already returned results and will never again represent executing code.)

String Equality

Here are some equal strings:

"abc"        equals      "abc"

"abc de"     equals      "abc de"

And here are some unequal strings:

"ab"         !equals       "abc"

"abC"        !equals       "abc"

"abc"        !equals       "aBc"

Let us try to find rules for string equality.

QUESTION 9:

Is the string "" equal to the string "" ?

(Is the empty string equal to the empty string?)