How to check the word persists as a suffix of a string in java by jayanthi ganesh
import java.util.*;
public class Suffix {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s1 = scan.nextLine();
String s2 = scan.nextLine();
boolean b = s1.endsWith(s2);
if(b) System.out.print("True");
else System.out.print("False");
}
}