chicago1985
Technical User
I currently have two String objects I check to find out if they are the same value:
Now how would I check 10 objects to find out if any of them have the same value?
Please advise.
Code:
String str1 = "red";
String str2 = "yellow";
if (str1.equals(str2)){
System.out.println("Equal");
}
else{
System.out.println("Not equal");
}
Please advise.