String.endsWith() Checks the string whether it ends with input string or not.
Return value is boolean ( true or false )

Here are some examples with output.
String my_str="plus2net";
System.out.println(my_str.endsWith("2net"));  // true
System.out.println(my_str.endsWith("et"));  // true
System.out.println(my_str.endsWith("t"));  // true
System.out.println(my_str.endsWith("plus2net"));  // true
System.out.println(my_str.endsWith("NET"));  // false
System.out.println(my_str.endsWith("plus2"));  // false
System.out.println(my_str.endsWith("pl"));  // false
This is case sensitive matching of end part of the string.

All String functions


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer