String.startsWith() Checks the string whether it starts 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.startsWith("plus"));  // true
System.out.println(my_str.startsWith("pl"));  // true
System.out.println(my_str.startsWith("p"));  // true
System.out.println(my_str.startsWith("plus2net"));  // true
System.out.println(my_str.startsWith("PLUS"));  // false
System.out.println(my_str.startsWith("net"));  // false
System.out.println(my_str.startsWith("et"));  // 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-2023 All rights reserved worldwide Privacy Policy Disclaimer