Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+13 votes

What is the negated expression of .equalsIgnoreCase() ?

asked in CSC211_Winter2018 by (8 points)

2 Answers

+7 votes
Best answer

If the expression is name.equalIgnoreCase("John") where name is a variable of type String, then the negation would be !name.equalIgnoreCase("John")....Do you see the ! I put in?

answered by (8 points)
selected by
+9 votes

The negated expression of .equalsIgnoreCase() would just check if the string you are testing does not equal the string in the parenthesis regardless of upper or lower case letters.

answered by (8 points)