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. thank you.
View Tutorial          By: lluulnw at 2014-11-22 12:39:35

2. Hi,
I am designing a client server multipla

View Tutorial          By: Varun Gupta at 2012-10-15 00:01:57

3. Very nice article.... explained the concept very n
View Tutorial          By: prashant yeole at 2010-12-16 03:15:07

4. chat
View Tutorial          By: zahra zare at 2009-05-10 07:07:57

5. Hi,
I run the program on windows (connectin

View Tutorial          By: Razvan at 2010-10-13 06:04:24

6. Please note that the above code does not work with
View Tutorial          By: mk at 2012-02-15 10:59:49

7. java.lang.NoSuchMethodError: main

<

View Tutorial          By: mark at 2010-09-27 03:46:48

8. hi I am execute this code But message can't send <
View Tutorial          By: Sudhir Patil at 2011-02-01 10:28:28

9. hello
plz tell me what can i do for sending

View Tutorial          By: mahipal at 2009-05-12 10:30:57

10. Dear Friends, I get the following exception...

View Tutorial          By: NT.Jay at 2011-10-06 05:33:09