Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of these methods of class String is used to check whether a substring exists at the beginning of the particular string?

a) StartsWith()
b) EndsWith()
c) Starts()
d) ends()

Answer: a
Explanation: Method startswith() of string class is used to check whether a substring exists in the beginning of string or not.

Join The Discussion