yourCounty = "perry";yourCounty.equals("Perry");yourCounty.equalsIgnoreCase("Perry");Using the above statements, what value will be returned by the equals() method? What will be the value of the equalsIgnoreCase() method? Explain how the equalsIgnoreCase() method can be useful when users type responses to prompts in programs.
What will be an ideal response?
The String class equalsIgnoreCase() method is similar to the equals() method. As its name implies, this method ignores case when determining if two Strings are equivalent. Thus, if you declare a String as StringyourCounty = "perry", then yourCounty.equals("Perry")is false, but yourCounty.equalsIgnoreCase("Perry") is true. This method is useful when users type responses to prompts in your programs. You cannot predict when a user might use the Shift key or the Caps Lock key during data entry.
You might also like to view...
The decimal number system is based on ____.
A. 1 B. 5 C. 10 D. 16
A font such as Webdings is made up of ________ that can be formatted as text
Fill in the blank(s) with correct word
Memory cards are typically volatile.
Answer the following statement true (T) or false (F)
Embedded style sheets apply to all pages in a website.
Answer the following statement true (T) or false (F)