string.equals()

String.equals() Checks two strings and returns boolean vlaue true if both are equal.
Syntax
String1.equals(String2)
Return value is boolean ( true or false )

Here are some examples with output.
String my_str1="plus2net";
System.out.println(my_str1.equals("plus2net"));  // true 
System.out.println(my_str1.equals("Plus2net"));  // false
System.out.println(my_str1.equals("2net"));  // false 
This is case sensitive matching of two strings

All String functions
Java

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com






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