Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Comparing String Variables
#2
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.");
}
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Comparing String Variables - by Vinwarez - 06-12-2012, 12:03 PM
Re: Comparing String Variables - by brandonio21_phpbb3_import2 - 06-12-2012, 08:59 PM
Re: Comparing String Variables - by Vinwarez - 06-13-2012, 04:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Comparing String Variables 0 2,134 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)