06-12-2012, 08:59 PM
Thanks for sharing! You can also use the following code snippet to see if two strings are equal to eachother.
Code:
if (string1.compareTo(string2) == 0){
System.out.println("The two strings contain the same value.");
}else{
System.out.println("The two strings do not contain the same value.");
}