When comparing strings, it's common mistake to use '==', But this is erroneous and should be avoided. Strings are compared by value and not reference. So while comparing strings, we use equal(). So for two strings S1 and S2, the comparison should be if(S1.equals(S2)){.....} and not if(S1==S2){.....}.
java programing shorts,
java code,
java programing 2022,
On this page of the site you can watch the video online Do not do this - Comparing Strings in java, java tutorial, with a duration of hours minute second in good quality, which was uploaded by the user Stack Solving - Core Java 20 March 2022, share the link with friends and acquaintances, this video has already been watched 12 times on youtube and it was liked by 0 viewers. Enjoy your viewing!