Discussion Forum : Searching And Modifying A String
Question -

Which of these method of class String is used to check weather a given object starts with a particular 

string literal?

Options:
A .  startsWith()
B .  endsWith()
C .  Starts()
D .  ends()
Answer: Option A

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

Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *