You should compare strings with the equals method. ==/!= checks for reference equality, equals for value equality.
equals
==
!=
How would I "fix" it?
I'm extremely new to Java and 'intern' is something I just learned about from looking it up based on your comment...
the same with me... this kata shouldn't pass the beta phase..
This only works if name is an interned string.
name
Loading collection data...
You should compare strings with the
equals
method.==
/!=
checks for reference equality,equals
for value equality.How would I "fix" it?
I'm extremely new to Java and 'intern' is something I just learned about from looking it up based on your comment...
the same with me... this kata shouldn't pass the beta phase..
This only works if
name
is an interned string.