So überprüfen Sie das Ende einer String -Java
public class Demo {
public static void main(String[] args) {
String str = "demo";
if(str.endsWith("mo")) {
System.out.println("The string ends with the word mo");
} else {
System.out.println("The string does not end with the word mo");
}
}
}
Xerothermic Xenomorph