Java examples for Language Basics:String
Java String endsWith
public class Main { public static void main(String[] args) { String strOrig = "Hello World"; /*w ww. j a v a 2s . c o m*/ if(strOrig.endsWith("World")){ System.out.println("String ends with World"); }else{ System.out.println("String does not end with World"); } } }