Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. Which of these method of class String is used to check weather a given object starts with a particular string literal?
  2. A.
    startsWith()
    B.
    endsWith()
    C.
    Starts()
    D.
    ends()

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    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()


Be The First To Comment