Reported in a candidate post, Feb 2025
String comparison with == vs equals and String Constant Pool
Filed under JPMorgan Chase
The question
Predict the output of string comparisons using both the == operator and the equals() method across several code snippets, and explain the role and mechanics of the String Constant Pool in Java.
No write-up yet. Related questions below have one.
Related JPMorgan Chase questions
Collected from public candidate posts and coding forums. Updated Nov 2026.