Java Tutorial 11 - Comparing Two Strings

preview_player
Показать описание

Learn how to program in java with our online tutorial. We will cover variables, loops, if else branching, arrays, strings, objects, classes, object oriented programming, conditional statements, and more.

Here we learn how to compare two strings in java.
Рекомендации по теме
Комментарии
Автор

Seriously the best java tutorials ever,

laurabartel
Автор

i love this videos they are very useful please continue on making more like this :)

carlosaponte
Автор

The >< serve for alphabetic compare between two string variables. And the == serves for compare the both variables are exactly the same.

stalin_developer
Автор

Thank you for this video! I have question, how can I compare 2 string arrays? For example:

String a[] = {“animal”, “food”, “place”};
String b[] = {“dog”, “cake”, ”japan”};

If (a[0].equals(b[0])){
//print Animal }

I know that .equals() won’t work for String arrays. I hope you help me with this!! Thank you

tram
Автор

Thanks, the way other people were explaining it confused me

bellion