Comment

leela
Example: Diff Between .equals() and ==,
March 18, 2008 at 6:04 PM

String str1 = new String("Hi");
String str2 = new String("Hi");
System.out.println(str1 == str2); //false
System.out.println(str1.equals(str2)); //true
View All Comments | View Tutorial
Related Tutorial and Articles

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles