kayleighanne5613 kayleighanne5613
  • 07-04-2020
  • Computers and Technology
contestada

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;

Respuesta :

kendrich
kendrich kendrich
  • 12-04-2020

Answer:

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.

Answer Link

Otras preguntas

Calculate the area of each circle and show work
i need help asap please
at a greengrocer,two bananas and one apple cost £1.16 and one apple and one banana cost £0.71 how much does one apple cost
if y varies directly with x and y =6 when c= -7 what is y when x =4
sinx= -29.3 solve the equation
Please help I need 2 more reasons on "Single-use plastic is beneficial because the plastic does not need to be washed" I also don't want to hear you guys say "B
During the daytime, uneven heating of earth’s surface causes the beach to heat more than the ocean water. a low-pressure and high-pressure system is created tha
which colored blender is the best looking?
Nellie buys 12 quarts of juice to serve at a birthday party. she gives 2 cups of juice to each of the 20 guests. how many quarts of juice are left?
please help!!!!!!!!!!!!!