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.

Categories

+13 votes

What is the negated expression of .equalsIgnoreCase() ?

asked in CSC211_Winter2018 by (1 point)

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 (1 point)
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 (1 point)
...