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



Ask a Question

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. Thanks for help
View Tutorial          By: Asha at 2014-12-20 08:25:48

2. Great example - easy to understand!
View Tutorial          By: George at 2009-12-30 03:48:37

3. hi What is the meaning of this line ,
you c

View Tutorial          By: Anil Chalhotra at 2013-02-16 08:04:03

4. hi i need moving clock javascript code...please se
View Tutorial          By: madhavan at 2008-10-19 21:59:45

5. hi purushothaman
thanks for your kind resp

View Tutorial          By: sandeep das at 2009-04-11 10:42:58

6. Hi mounika, Did you download and install the javac
View Tutorial          By: Ramlak at 2008-04-27 05:49:42

7. Hi All could you pls. send the execution of the ab
View Tutorial          By: subbu at 2008-01-28 03:14:27

8. sir, i am completed MCA 2011 and i want to learn P
View Tutorial          By: vipin kumar at 2011-09-13 13:00:05

9. This tutorial is good for beginners. If you provid
View Tutorial          By: Sateesh Bobby at 2008-12-09 23:56:18

10. Nice example for FileReader and FileWriter,

View Tutorial          By: Tim at 2009-10-21 17:31:00