endsWith( ) method in string | java | ICSE X | class 10 | Semester 2 | computer applications

Опубликовано: 10 Май 2026
на канале: Saket Jaiswal
35
10

The endsWith() method returns true if a string ends with a specified string. Otherwise it returns false.
The endsWith() method is case sensitive.

SYNTAX:
string.endsWith(searchvalue, length)

PARAMTER:
searchvalue - The string to search for.
length Optional - The length of the string to search.
Default value is the length of the string.

A boolean value - true if the string ends with the value, otherwise false.



Click on this google drive link to get the code of the program :
https://drive.google.com/file/d/1ZGZm...



Instagram :   / saketjaiswalsj009