Vidyalelo
Java Programming · Q23

Strings

Programming · Java Programming · question 23

Q23

In Java, what is the purpose of the endsWith() method of a String object?

A.
To check if the string ends with a specified substring
Answer
B.
To add a suffix to the string
C.
To remove trailing whitespace
D.
To check if the string contains a specified character

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board