String |
The contentEquals() method examines a string to determine if it exactly matches the sequence of characters in the specified string or StringBuffer.
It returns true if the characters match and false if they do not
One of the following options:
public |
public |
Parameter |
Description |
StringBuffer chars |
The StringBuffer to search in. |
CharSequence chars |
The sequence of characters to search for. |
The StringBuffer class, found in the java.lang package, functions similarly to a String but allows for modifications. Additionally, the CharSequence interface, also located in the java.lang package, represents a readable sequence of char values |
returns |
A boolean indicating whether the exact sequence of characters exists in the specified string (or StringBuffer).
True: The sequence of characters is present. |
Java Version |
1.4 (contentEquals (StringBuffer chars)) |