Check if a string is suffix of another | Java program to find if a string is suffix of another ; Test case - sensitive implementation of endsWith function
class GFG { public static void main ( String [ ] args ) { String s1 = " geeks " , s2 = " geeksforgeeks " ; boolean result = s2 . endsWith ( s1 ) ; if ( result ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }