The method of class String used to check whether a given object starts with a particular string literal is startsWith(). The startsWith() method is a built-in method in the String class in Java. So, option a is the correct answer.
startsWith() takes a string parameter and returns a boolean value indicating whether the given object starts with the specified string. It compares the characters at the beginning of the string with the specified prefix and returns true if they match, otherwise it returns false.
This method is useful in scenarios where you need to check if a string starts with a specific pattern or prefix, allowing for conditional logic and string manipulation based on the result. So, the correct answer is option a. startsWith().