Skip to content

Alice and bob fix#31

Open
smartist17 wants to merge 1 commit intoZipcoder:masterfrom
smartist17:master
Open

Alice and bob fix#31
smartist17 wants to merge 1 commit intoZipcoder:masterfrom
smartist17:master

Conversation

@smartist17
Copy link

No description provided.

public String evaluateAliceOrBob(String input)
{

if (input == "Alice"){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I detect that this code is problematic. According to the Bad practice (BAD_PRACTICE), ES: Comparison of String objects using == or != (ES_COMPARING_STRINGS_WITH_EQ).
This code compares java.lang.String objects for reference equality using the == or != operators. Unless both strings are either constants in a source file, or have been interned using the String.intern() method, the same string value may be represented by two different String objects. Consider using the equals(Object) method instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants