Ask Question
2 January, 09:50

Assume that partNumber references a String object. The following if statement should perform a case-insensitive comparison. What is wrong with it? if (partNumber. equals ("BQ789W4")) available = true;

+1
Answers (1)
  1. 2 January, 10:10
    0
    A case sensitive comparission better to use library function strcmp ().

    Explanation:

    The part number references are string objects. In order to perform a case sensitive comparission? it is going to be better if one make use of a library function strcmp ().

    This will work best for a part number reference consideringthe fact that it is a string object. This is simply because, string objects are best implemented using library function when the string object happens to be used in a case sensitive comparison.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that partNumber references a String object. The following if statement should perform a case-insensitive comparison. What is wrong ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers