how to compare strings java

Solutions on MaxInterview for how to compare strings java by the best coders in the world

showing results for - "how to compare strings java"
Moritz
04 Aug 2019
1System.out.println("hey".equals("hey")); //prints true
2
3/*
4	always use .equals() instead of ==,
5    because == does the compare the string content but
6    loosely where the string is stored in.
7*/
Oskar
19 Apr 2017
1// compare two strings in java using String.equals() method in java
2public class EqualsMethodDemo
3{
4   public static void main(String[] args)
5   {
6      String str1 = new String("HelloWorld");
7      String str2 = new String("Flower");
8      String str3 = new String("Hello");
9      String str4 = new String("Hello");
10      String str5 = new String("hello");
11      // compare str1 != str2
12      System.out.println("Compare " + str1 + " and " + str2 + ": " + str1.equals(str2));
13      // compare str3 = str4
14      System.out.println("Compare " + str3 + " and " + str4 + ": " + str3.equals(str4));
15      // compare str4 != str5
16      System.out.println("Compare " + str4 + " and " + str5 + ": " + str4.equals(str5));
17      // compare str1 != str4
18      System.out.println("Compare " + str1 + " and " + str4 + ": " + str1.equals(str4));
19   }
20}
Julia
07 Jul 2019
1******Java String compareTo()******
2
3  The Java String class compareTo() method compares the given 
4  string with the current string lexicographically. 
5  It returns a positive number, negative number, or 0.
6  ___________________________________________
7  	if s1 > s2, it returns positive number  
8	if s1 < s2, it returns negative number  
9	if s1 == s2, it returns 0  
10  ___________________________________________
11  
12  
Davide
12 Sep 2018
1if (aName.equals(anotherName))
2        { 
3            System.out.println(aName + " equals " + anotherName);
4        }
5        else 
6            { 
7                System.out.println(aName + " does not equal " +anotherName );
8                           
9            }
Louisa
28 Jun 2016
1// These two have the same value
2new String("test").equals("test") // --> true 
3
4// ... but they are not the same object
5new String("test") == "test" // --> false 
6
7// ... neither are these
8new String("test") == new String("test") // --> false 
9
Daniele
04 Jul 2017
1class scratch{
2    public static void main(String[] args) {
3        String str1 = "Nyello";
4        String str2 = "Hello";
5        String str3 = "Hello";
6
7        System.out.println( str1.equals(str2) ); //prints false
8        System.out.println( str2.equals(str3) ); //prints true
9    }
10}
queries leading to this page
string compare of object javawhat does compare method do in javacan you use 3d 3d to compare strings in javajava how are strings comparedcompare to in string in java 2c compareto 28 29 2c in java stringhow to write a compareto 28 29 method in javacompare if two strings are equal javacompareto method in strings in javacompare native string in javahow to check whether two strings are same in javahow to compare two string in javatext comparison in javacompare strings in comparator java compare to in javawhy we dont have string compare 28 29 javacomparing javahow to check if string equal in javahow do strings comparecompare 28 29 javajava most reliable way to compare two stringsif string equal to javacopmare strings javahow to check if two string aare the same in javacomapre strings in javacomparing string in jvastring java comparejava string 3d 3d stringif string 3d 3d 22 22string java comparetoin java which of these is used to compare two string objects for their equality 3fhow to compare the string in javahow to compare multiple strings in javahow to compare two string string compare in java with equalsequality in strings with javacompare two string in havahow to compare strings in ajvacompare values in strings java 3d 3d between 2 strings in javacompare if two strings are equal in javahow to check if a string is 3d 3d to a different stirng javacompare string with 22 22 javastring comparison with 3d 3d javastring comparison in java using equalsjava two string equlaityhow to compare strings in java using if statementshow to compare a variable to a string in javaequals or 3d 3d string comparison javacompare string valueequals between strings javahow do i compare a string name with four other string names in javaverify string with 2 variables javajava string compare methodcompare value javajava how to compare two stringsjava string comparasonjava check equality of stringscompare string values in javacompare in string javacompare method in java for two stringsjava comparing strings codejava string comparehow tocheck if both strings are equal in javahow java compares strings by defaultcompareto strings in javajava string compareto codejava can you check if a string 27s address is equalwrite a java program to read two strings from command line argument and check the equality of two string using string function compareto string function in javahow to compare two strings in javasjava compare 2 stringhow will you compare string values in javastring comare in jacvajava 2 string comparecompare method javajava comparing stringshow to compare string in java in if conditionjava compare strings by valuecomapre string in javawhat method is used to compate two string javacheck if 2 character strings are identical javacompare strings equal in javahow to compare 2 binary strings in javajava compare 2 stirngscomparing strings if st javahow to compare string in java using if 3d 3d com 2 stringshwo to comate strings in javacan you compare two strings with 3d 3d in javahow do i compare strings in javajava string comparison methodsallintitle 3ajava compare two stringsjava compareto in javacheck equal strings javai need to use comparator to compare two string typeshow string compareto works in javacompaer strings in javajava compare two stringif string 3d 3d string javahow to compare two strings in javastring value comparison in javastring comparison in javahow to check if strings are equal in javahow to check 2 strings are equal in javacan i use 3d 3d to compare strings in javawhich method is used in string to compare string in javacomparison of string in javacheck if two strings are same in javawrite a program to compare two string in javacompare string in javacompare string using comcompare two strings using boolean function in javacreate equal stringscompare with javajava comparatorjava 2b compare stringscompare string java with with part of stringhow does string comparison work in javacomparing in javacompare twostrings javacompare two strings not equals in javacompare is a string is the same as an other string javacomparing 2 string give falsecan you compare two string in jhavajava compare 2 strings for equalitybefore and after comparison of string javahow to compare two strings javajava to compare string equalitycompare strring javacompare two strings are equal in javausing equals to compare stringshow to comapre string in javastring compare injavajava sring comparejavatuto to compare string equalityjava check if 2 strings are equal to other 2 stringsjava comparing strings with 3d 3dcompare strings differentcheck if a string equals javacan we compare two strings using 3d 3d in javajava sting comparereliable way to compare strings javahow to check if a string is equal to something in javato check if two strings are equal in javacompare length of two strings javajava if string is a stringcheck two strings are equalcompare string in java comaprtorcompareto in javahow is strings compared in javacomparer 2 string javastring compare java deviatescomparing string equality javastring comparision javacompare two string according to string equals javacomapre two strings javacompare operator string javacompare string to string javajava compareto method stringshow to check if two strings are not the same in javacompareto 28 29 in javajava how to compare 2 strignsccopmaring string in javacompare to a javastring comparison in java with referencewrite an application that compares two strings that a user inputs from the command linehow to check if two strings are equal in javacomparing two strings in java 8java comparetocompare strings ajvahow to use compare to in javajava comparator comparing stringstring values are compared using 27 3d 3d 27 not 27equals 28 29 27most reliable way to compare strings javacomapre two strings in javaexample of compareto in javajava string compare functionstring 1 string 2string compareto in javacompare multiple strings in javajava check if sting is samestring comparisonstring compare to javastring comparison oin javajava compare more than two stringscompare two strings2 string not campare in javahow to use compareto in javajava comparing two stringcomparing the strings in javacompare content of two stringcomparestrings javacomparing two string javaequality of strings in javacomparing 2 strings in javaequality string in if in java java compareto methodhow to compare two string javato compare two stringscheck if two strings are equalequate strings javacompare one string to anothercompare to method in javacompare strings 5b 5dcompare two stringa in jvjava language check if two strings are equalcompare different string java compareto java stringscompare three strings javacompare string in java if conditioncompareto 28 29 string in javahow to comapre two strings in javacompare to in javacompareto java stringshow to compare 2 strings in javacomparing to string in javastring compare javahow to compare string values in javacheck if 2 string are equal java compareto in javahow to compare strings values in javacompare to on string prperty javajava string comparison 27to compare string values in javacompareto strings javacompare 28 29 method in javacompare strings javqcompare string in jvacomparison operator for string in javastring comapre javastrings compare javacompare str javacomparing stringsin javacompare function javajava compare textcheck if string equeals stringcompara two string javacheck string equal in javahow does java compares stringshow to compare characters in a string in javacompare strings jaacompareto method in javajava check values of two strings are equalhow to compare with a 22 in javastring value compare in javajava checking stingif else string comparison in javahow to compare string in if using javajava compre two stringscomparing two string in javacomparing strings content javaequals compare stringcompare string with equals javahwot to compare to strings javajava compareto stringscompare two strings in java ifcompare strig in javajava comparing strngjava compare two string equalcompare strings in if statement javajava compare strings equalare strings comparable in javahow to compare if two strings are equal in javamatch string in javacompare stringsjava code for comparing string in data compare in javacomparing string in java not equal to same stringjava string compareto stringhow ot do string comparison in javacomparison between two stringsjava comparing examplestring 3d 3d in javacompare strings jaavcompare method for string javasting compare javahow to compare content of string in javamatch two strings in javajava compare valuecompare 2 strings in javacompare teo string in javacan you compare three strings in javajava string comaretojava compare differeces between two stringscompare string content javacheck if string equal to string javacompare string valuesstring compareto method in javacheck string value in javahow compare strings in javatwo return types javacheck string equality javajava comparetocheck to strings in javacheck value of 2 strings javahow to compare substring in javasee if two strings are equal javahow to compare two arrays in javastring compare method in javastring compare to function javahow does java compares strings using comparetoignorecasecompareto method javacompare two strings if they are equal javajava compare to stringsstrings comapreto javahow do you compare two strings in javacompare two strings jacaverify 2 string are equal javahow to compare two strings in java using comparatorcan we use 3d 3d to compare strings in javahow string comparison works in javajava string value comparisonsting comparison in javajava check if string is equal to another stringcompareto function in javacompare the content of a string variable in javacompare javacompare string to string 5b 5dhow to use string compare in javajavatuto compare string equalitycompare string and string javacomapre two string javastring compare to java documentationhow to compare two strings in if condition in javaare this strings equalhow to compare two string objects in javacompare method in javacomapring string with the same lenght javastring1 equals 28string2 29 javacan you compare strings with 3d 3d javajava compares stringcompareto string method javacompare twoo strings in javastring 3d 3d string javastring comparison in java using 3d 3dhow to see if two strings are equal in javahow to do string comparison in javajava compare string equal tobest way to compare strings in javawhat can you compare with compare to in javacomparing string javajava compareable stringjava 8 compare stringsstring compareto java examplestring equals new stringjava two string 5b 5d comparsionjav chk stringtwo strings equal in javahow compare works in javathe to compare method java 3d 3d operator java comparing stringshow to check stringstrcmp in javajava string equalitytext equals method javajavav compare stringhow to check if tow string are equalhow to test string in javacompare equality of two strings in java compareto java stringcompare value of teo strings in javacompare 2 strings in jjavacompare two stringhow to write a compare method in javawhy doesn 27t 3d 3d work to compare strings in javatwo string compare in javahow to compare strings in javshow to compare string literal in javacommpare two string in javastring compare methid javahow to compare strings java 3fstring and new string compare javaequality of stringscompare twostring in javacomparison javajava compare tjava string compareto 28 29how to compare to stringshow to compare 2 string in javahow to compare strings in jqstring comparing javacompare two stirngs javahow to compare string in java eestring comparison greater than in javastring operations java comparing two stringscheck if 2 strings are equal javacompae stirng javahow to compare to strings in java 285 29 write a program to compare the strings given below 2c string 1 should be compared with all the other stringsjava string compare to how it workshow to make two strings equal in javacompare string values javacompare chars in javacompare a part of string in javaequality string in javacompare to string in javacompare two strings in java using inbuilt funhow to compare string variables in javado strings always need equals to compare in javacompareto string method in javajava string equal to stringbuilstring compare string javastrcmp i javawhich is better to use for comparing two strings 3a the equals 28 29 function or 3d 3d for strings in java 3fcompareto in string javahow to compare two strings and check which is greater and smaller in java 3ffunction to see if a strings content is equal to another strings contentcompare stirng in javacompare a string with another string in javahow to check equality of two strings in javastring compare in javacompare stings in javacompareto 28 29 javajava compare string valueshow to compare more than two string i javahow to compare strings in jaastring compare java 3d 3dwrite a program to compare the strings given below 2c string 1 should be compared with all the other stringsjava string comparison equalsjava test string equalshow to compare multiple strings in equals javahow to check if a string is equal to another string in javacompare between two strings in javanot equal compare strings javacompare string in java if statementcompareto method java stringhow to compare two strings in java using ifcomapre string javajava compare 2 stringsjava string compare tojava comparingwithcompareig 2 string javacomparison betwwen strings javajava compare strings greater than stringcheck if two strings are equal in javacheck if 2 string are eaqulstring compare 28 29 javacompare java stringcompareto java iof both string equal 3d 3d string in javastring compered javacompare a string in javawhich is the most reliable expression for testing where the value of two string variable are the same 3fcompare to in java stringsjava how to compare multiple strings at onfcehow to compare works in javacompareto in java stringhow to compair string in ifhow to check if tow string are equakhow to make a string equal another string javacompare 2 string in javastr compare javajava compareto functioncheck two strings for equality in javahow to use to compare method n javahow to compare two given strings in javajava comparte 2 stringsjava method to equal two stringsif two strings are equal javacomparing string with 3d 3d in javacheck if string is equal javato compare javachecking if strings are equal javamost reliable way to compare two strings javastring class compare javacomparing string new stirng 28 29 javastring compare 28 29 javahow to compare string 5b 5d in javacomparing strings in java with 3d 3dcan you compare strings using 3code to compare strings in javacan 3d 3d be used to compare strings in javacompare 2 stringscompare betweeen strings javajava check if strings are equalcompare strings in java not equalstring equal comparison in javatwo string equal javacompare to use in javacheck if strings are different javacompareto string in javatest strings equal javacomaprinf two strings using boole an javamatch two stringjava compare stringshow does compareto work for strings in javajava compare tostring compre javacompare string in jvavcompare two strings in java using 3d 3dcreate a program that takes in two words 2c check for equality ignoring the cases 2c if the words are equal the print the word in javahow to compare 2 strings in java for smallerin java 2c how should i compare two strings to see if they are equivalent 3fhow to compare strings in sjava compare in java stringcompare string and string object in javastrings compareto javajava comparecompareto 28 29 method in javajava comare stringscompare string in java not equaljava compare stringestring compare to java 27compare two strings in if statement java write a java program to compare two string y should nt we compare number in string javajava compareto stringjava 2 streing ewqualjava check if strings are the same 3d 3d 3d between two stringsstring equal checker in javajava best way to compare stringsjava check stringhow to compare string in javajava compare stringdequal 2 strings javahow to check string value in java 3fjava how does compareto workstring comparison using 3d 3d in java 3d 3d checks for java stringsjava string compareto methodcompare string 5b 5d javacan we compare strings in javacomapre two string in javawhich of the following are use to compare a string value 3ffinal compare strings in javastring 1 3d 3d string 2java compare strings with greater thanwhat does compareto do in javahow to compare two strings in java which is greaterjava check values of two strings are the samehow to compare string if javajava string comparison operatorshow strings are compare in javajava equal stringsand string java ifcheck if string equalshow to check equality of string in javaset string compare javastring operators used to compare with stringcheck if 2 strings matches javastring meaning comparison javacompare function in javaif with string javastring comparison methods in javacompare values of two strings in javahow to compare variable strings in javahow you compare two strings in javacompare string equality javausing if to compare strings javacompare if two strings have same value javastring method to compare two stringscompare string with character javajava compare to methodjava compare two string equal are notjava compare string equal or notjava method to compare two stringscompare two string javacompare to strings javahow compare two strings in javawhere to compare two stringscompare sring values javamultiple string comparison in javahow to compare stringsjava check strings for equalitycan you compare strings with 3d 3d in javajava compare strinshow to compare 2 strings javastringhow to compare each string of two strings if they are equals in javacompare strings bigger than javajava compare string contentcompare javahow to compare two stringshow to compare string in java examplecompare two strings javacomparing strings using the methods equals 28 29 in javajava compare two strings examplehow to comparte two tring in javato test two strings for equality you should use one of the two methodsstring 2 strings are equal or nothow to comparer srings in javacheck if two stringsare equal javahow to compare the two stringshow to use compareto method in javacomparing strings in javajava use 21 3d compare stringwhy can 27t java compare a string in a var with a normal stringcheck equality of string javaque hace el metodo compare to javajava compare two strings similarityhow to compare the string value whether they are same or not in java compareto javahow to comapre strings 3e in javajava check if two strings are equaljava comparing two stringscompare to function java stringcan i compare two strings in javahow do you compare strings in java 3fcompare to string javainbuilt function to compare two strings in javajava compare strings of different sizecompare to strings in javastringjava string 21 3dfastest way of compare strings javahow to compare stinrgs javacompare 2 strings javajava comparer 2 stringstring compare in j vaacompare a string variable with a string in javahow to compare tring in javacan you cmopare strings with 3ehow to compare the strings in javahow ot compare string in javahow to compare stringhow to compare two elements of a string iin javajava compare s 3e in string comparison javahow to compare two strings are equal in javajava compare 26 string compare to method javastring comparison in java using ifcomparing two string values in java less or moreto compare two string objects 3acompare two string in javahow oot compare string in javajava if compare stringswhy can 27t we compare string in java using 3d 3dhow to compair string values in stringwhat happens if you compare strings in javajhow to compare 2 string in javajava if statement compare stringshow to equal to stringstring compare function in javahow to check two string are truehow to check the equality of string data member to another data member in javacomparison of strings in javahow to compare data of string in javacompare to strings in javastring comaparitioni javacomparing string objectsstring comparison javajava compare functionjava same string valuestrings string comparison in javacomparing two strings javacompare function for string in javastring values are compared using 27 3d 3d 27 2c not 27equals 28 29 27how to compare strings in an object in javadifference in strings valuestring comparision in java 7ecompare strings javastring compare in javahow to compare strings javaexplain the compare function in javajava how to compare string valuescompare two string in jvastring compaare in javahow can i compare string in java 3fthe to compare java 21 3d string javacreate two strings using new keyword and compare using 3d 3d operator in javahow to compare two srings javatwo string are equal or not java methodjava string comparehow to comparison of java stringscomparing string objects in javajava compare a stringhow to compare a string in javahow to check string in javacompare of two string in javacompare string in jabastring coparison jkavaif comparsion for strings javacompare 2 string javacompare string java examplehow to comapre two string in javacomparing strings with 3d 3d javahow to chcek string in javajava best string comparisonif condition to compare two strings in javawap to comparing 2 strings using equals method in javacompares strings in javacheck string equality in javajaba compare stirngcompare strings meaning java pramp diff between two stringscheck if strings arent ewual javajava compareto with string compare strings greater than javacomparing 2 string in javacompare strings in javacompare the two strings in javawhere is compare method in javacompare 1 value of a string to each other value in the string javajava comparing stringhow compare a string in javacomparator java how to compare stringcompare tp strings javamatching two strings codecheck two strings are equal in javaa compareto 28b 29 in javacompare two string equality in javacomparing string in javajava comparisoncompare two strings in java without case sensitivejava string string comparecomparing to strings in javastring compare using 3d 3dhow to compare 2 strings 3fjava comparing strings using 3d 3dwhat does java string compareto docompareto in java strnigcomparing two strings in java with equals 2c compareto 2c 27 3d 3d 27compare to method javahow to compare class string to normal string in javacompare two stringsin java one statementjava compare strings with errorsjava compare method for stringshow to compare if two strings are simularcompare two strings with cosine similarity javajava comparing string valuesjava string comparetohow to check string equality in javahow do you compare strings in javacomparing strings javacomparing two string 3d 3d java2 strings compare javacompare 2 string are same in javajava if of two string objectsjava how compare stringcompare 28 29 javahow ot compare strinfs in javacompare with string javacomparae string in java java if string equals stringstr compare in javajava can i compare strings with 3d 3dhow to compare two string in javastring equality check in javacompare string in ajvacompare strinf javahow to compare the two strings in java compareto java stringcomparing two string variables in javahow to compare a variable with a string in javacompareto between strings javacheck if string equal in javacompareto on string javahow to compare values javacomparing 2 strings javastring comparing functions javaif string 3d string javacompare 28 29 in javain java how to compare two stringshow to compare 2 string 3d 3d in javacode to compare two strings in javahow to equal two strings in javacamparing two stringwhen comparing strings in javacomparing strings java with 3ehow to compare two strings in java in ordercompare two stirng in javafind the difference between two lists in javacomparing 2 stringchack string javajava compare sttringswhen compare string javathe 21 3d operator can be used to compare two string objects compare string deviation in javahow to compae two string in javahow to compare 2 strings in java for smalljava checking string equalitycomparing the begining of string values javahow to compare to string in javahow to compare stirngs javastring comparisonschecking equality of 2 strings in java compare string javausing string with compare in javajava string compareshow to string compare in javacompare string javacompareable string javacomparison two stringshow to compare data in strings javatest if two strings are equal javajava comparing 2 stringsevaluate 2 stringscomparing strings in java if statementhow to check equel between stringcompare string value in javacompare to javacompare two strings ljavacheck equality of two strings in javajava check if 2 strings are equaljava compare to stringwhat does compare do in javahow to compare two strings in java 3fjava if string equalsstring comp javaif string 5b2 5d 3d 3d 22 22how to compare strings in javatest whether strings match javamost accurate way to compare string in java 3d 3d in string comparison javahow to compare two string variables in javacheck whether two strings are equal or not in javajava compare stingcomparison in javastring equality in javacompare two strings in javahow to compare two strings in ajvacheck equality of string in javastring compareto javacompare in javastring comare javajava string comparisoncheck for string equality javastring compare java javahow to compare values of string in javacompareto 28string cadena 29 javacompare three strings in javausing string builder to compare 2 strings in javacompare substring in javajava compare if two strings are equaljava string comaprejava string comparetojava how to compare two stringhow to compare the value of two strings in javajava string comparetohow to compare one string to another in javatwo strings equal javajava string comparison using 3d 3dhow to compare java stringsif 28str 5bi 5d compareto 28str 5bj 5d 29 3e 0 29 meaning in javahow to or two string in javacan you compare 2 strings objects using 3ejava compare stringcompare fubction javahow to compare two string if they are equal or not in javahow to check if string equals in javacompare strings in jjavahow to compare 2 strings javacomparing strings in java notcompare string using 3d 3dhow to compare string in jvawrite a program to compare two strings in javajava how to compare strings with compare methodjava string equals another stringcomparing to javacomparing two strigns in javacompareto string javastring equals 28new stringjava compareto two stringscompare stringcomparing names in javacomparing t javacompare text jastring comparison 3e in javacomparing strings with string in javacomparing two strings in javacheck strings in javahow does compare to work in javathe string method compareto 28 29 returnsjava how compare workscomparing values of strings javawhat is string comparison in javajava string in if comparecompare two strings in 5cjavahow to compare a stringfunction compare between to string in javastring compareto method javacorrect way to compare two strings in javacompare string kavastring comparecan you compare strings in javajava check for two equal stringsjavatuto compare two stringjava if of two string objects 3cjava string comparrisonwhy w dont have string compare 28 29 javacomparinf string in javajava string check for 5b 5dcompare strings java equalsstring conparision in javahow to check 2c stringjava arrays comparesame string java compare strings not equalhow to campare to string in javahow to check if 2 strings are equal in javahow to check two strings are equal in javacompareto method of string in javause compareto method for comparing two strings in java 5cjava strings compare equalcompareto by string javacompareto 28 29 string java javahow to compare two stringscompare function strings javacompareto of string in javacompare string is javacompare string value javacomparing of two strings in javacompare method injavacomare two string in javacompare 2 strings and print updated onejava string equals 1 or 2coparing strings javajava string compare onlinejava how to check if strings are the same valueequality string javacomapre strings javastring compareto in javacompare 2 strings java if statementmethod to compare two strings in javajava if check stringcomparing two stringsproblem in comparing 2 strings javacompare strings with 3d 3d javajava comparingjava compare string that have umlatto compare two strings in javaor in java stringstring compare javac 2b 2bstring compareto string javacomparision of string in javajava compare stirngshow ot compare strings javajhow to compare strings in javacompare the contents of two string objects in javahow to check if two strings are equal javascequating two strings in javajava compare two stringshow to match string in java compare to javaequality if string in javaare strings comaprable in javastring comparion in javastring1 3d 3d string2 javaequals string comparison javastring compare function javawhy we cannot compare strings in javahow to compare string with number in if statement in javaif 2 string matchstrings comparision in javastring java ifcheck if two strings are the same javacompareto 28 29 java stringscompare string in java using 3c 3ejava string compare valuehow to compare string in if condition in javacompare strings and or operator in javahow to check string is eqaul to another string using in java 3fstring compare javato compare in javajava compare strings greater thanwhat string not compare javacompare string function javajava comparing two words in a stringjava comparing to stringsstring comapre in javacomparing string object in javahow can i compare 2 strings in javahow compare two string in javacheck if string equals string 5b 5d javacompare to stringin javacompares two strings javahow java compare stringshow to check if string equals in java in if statementjava string comparerto compare javaif srting javatwo equal strings are different javahow to compare string javajava string equal tocompare strings javajava how to compare to stringscompare string java 3d 3djava comparestring compareto javastring equality javajava compare methodhow to compare tow strings in javachecking string equality in javacompare char of string in javahow toi compare strings in javabest way to compare two strings in javajava compare two sets of stringscompare by 3d 3d in javato compare string in javaif string and string are differenthow to compare a string to a string in javahow to compare styring in javatest if strings are equal javamethod to check string equalityjava how to compare stringsjava string comparisionjava compate stringshow to check and compare in javacompage string javaif string javajava int comparetojava comapre two stringsfastest way to compare strings javajava compare strinf 2bcompare javahow does compareto work in javahow to compare 2 strinhow to compare 2 stringshow to check if two strings are equalcompare string equal javahow to compare strings java