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 given object starts with a particular string literal?

a) startsWith()
b) endsWith()
c) Starts()
d) ends()

Answer: a
Explanation: Method startsWith() of string class is used to check whether the String in question starts with a specified string. It is a specialized form of method regionMatches().

Join The Discussion