str2.endsWith(suffix: String): boolean

class endswith
{
public static void main(String[] arg)
{
String str1 = "Welcome to Smartprogrammeron.blogspot.in";
System.out.println("str1.endsWith(\"in\") is " + str1.endsWith("in"));
       System.out.println("str1.endsWith(\"iN\") is " + str1.endsWith("iN"));
}
}


To check is strings ends with given string or not. It case sensitive.

Popular posts from this blog

Shutdown Pc

Ellipse using OpenGl

String Comparisons