Question: Assume myStr is a String variable read from the keyboard. Which of the following options could be used to see if myStr is equal to

Assume myStr is a String variable read from the keyboard. Which of the following options could be used to see if myStr is equal to "cps180"(case insensitive)-(Select all that apply)
myStr.equals("cps180")
myStr.equalsIgnoreCase("cps180")
myStr =="cps180"
myStr.toLowerCase().equals("cps180")
myStr.toLowerCase()=="cps180"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!