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

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

Java program to check if user input is an even number

Archived Comments

1. insert a value in excel is not a problem but inser
View Tutorial          By: durga at 2010-03-05 23:08:02

2. Hi Shruti, If you have better samples then feel fr
View Tutorial          By: jagan at 2010-03-03 19:42:46

3. could you send me a code for a music video mobile
View Tutorial          By: Christian at 2009-08-28 23:03:45

4. it is very easy to understand to the learners.
View Tutorial          By: venkat at 2010-06-19 02:37:36

5. I want to ask you a question...
I test the

View Tutorial          By: sara at 2009-05-15 13:16:54

6. int m,m2,n,n2;
for( m=0 , m2=0 ; m<

View Tutorial          By: muhammad abdullah at 2012-10-11 05:27:02

7. Thanks for the tutorial.

One questi

View Tutorial          By: Stephen at 2012-06-09 06:36:23

8. can i apply multidimensional array list the progra
View Tutorial          By: aninostephen@uyahoo.com at 2009-07-01 05:09:27

9. Guys can you send me complete program for recievei
View Tutorial          By: KEVIN at 2011-06-10 21:52:04

10. now I know what isset is for, thank you very much
View Tutorial          By: Anonymous at 2010-12-23 20:43:29