Comment on Tutorial - equals( ) Versus == in Java By Mashoud



Comment Added by : vijay

Comment Added at : 2011-08-21 15:09:41

Comment on Tutorial : equals( ) Versus == in Java By Mashoud
what ll be result for s1==s2 and s1.equals(s2) for following cases?
1)String s1="hello";
String s2="hello";

2)String s1 = new String("Hello");
String s2 = new String("Hello");

3)String s1="hello";
string s2=s1;


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I have downloaded all the files
SMSClient.j

View Tutorial          By: Sanjay at 2010-06-29 04:48:16

2. Hey,

I am having a peculiar problem

View Tutorial          By: mehr at 2011-05-11 10:22:46

3. Can you please send me the full code in sending an
View Tutorial          By: jen at 2008-05-28 00:22:21

4. @Zero Code

@
Catch ex As Ex

View Tutorial          By: Chitz at 2011-12-24 19:50:45

5. ma'am aiza teaches us very well.. >< i like
View Tutorial          By: chai at 2011-02-07 07:06:36

6. Hi Rahul,How to run this program kindly send me th
View Tutorial          By: Das at 2008-09-04 00:53:02

7. i am not getting output by using this code..after
View Tutorial          By: dhaval at 2011-01-03 03:42:28

8. Best example to explain Inheritance. thankyou for
View Tutorial          By: Suresh Lilhare at 2010-05-14 09:10:27

9. Thank you
View Tutorial          By: dara at 2009-12-19 02:46:52

10. Please help me i am getting following error messag
View Tutorial          By: Balaji at 2009-09-23 22:54:06