Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to check the end of a 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");
       }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: java loop through list 
Java :: javafx text wrapping 
Java :: discord jda 
Java :: Duration class java 
Java :: c# or java 
Java :: java replace first occurrence of substring 
Java :: build.plugins.plugin.version 
Java :: java arraylist deepcopy 
Java :: okhttp post 
Java :: generate serial uuid with intelij 
Java :: List into string java 
Java :: get day from date month year java 
Java :: get minimum of array java 
Java :: create a list java 
Java :: java solid principles 
Java :: java get length of a string 
Java :: jbutton open jframe java 
Java :: java run code at interval 
Java :: create array of particular length in java 
Java :: random number generator java with range 
Java :: java replace element in list 
Java :: convert two bytes to int java 
Java :: how to clear text fields in java 
Java :: number format java 
Java :: different types of variables in java 
Java :: android maven dependency 
Java :: lombok maven plugin 
Java :: synchronized block java 
Java :: java remove map 
Java :: public class in java 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =