Tips for heathy life

Tips for heathy life

Kamis, 30 Oktober 2008

Comparing CONTENTS OF TWO has OBJEK string in J2SE



I want to share how to Comparing CONTENTS OF TWO has OBJEK string. You can use this code but if you copy this code and paste in your blog/website, please insert this link of article.

String str1="Hello";
String str2="Java";
String str3="HelloJava";

System.out.println(str1.equals(str3));
System.out.println(str2.equals(str3));
System.out.println((str1+str2).equals(str3));

0 komentar:

Posting Komentar