Skip to main content
๐Ÿ› Bug HuntJV Java Medium+20 XP

String Equality Bug

This always returns false for matching strings.

๐Ÿ› Find the bug
1public boolean isMatch(String input) {
2 String target = new String("hello");
3 return input == target;
4}
๐Ÿ› The bug is on line 3

๐Ÿ”ง Select the correct fix:

Priygop - Leading Professional Development Platform | Expert Courses & Interview Prep