Which of the following determines whether the string stored in the part variable ends with the letter

Question:

Which of the following determines whether the string stored in the part variable ends with the letter B? 

a. if (part.ends("B")) 

b. if (part.endswith("B") 

c. if (part.substr(part.length() – 1, 1) == "B") 

d. None of the above

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: