1) boolean String.startsWith(String prefix)
This function returns "true" if staring starts with "prefix" (substring) otherwise it returns "false".
2) boolean String.endsWith(String postfix)
This function returns "true" if staring ends with "prefix" (substring) otherwise it returns "false".
Example of String.startsWith()
Output
Example of String.endsWith()
Output
need an explanation for this answer? contact us directly to get an explanation for this answer