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. know someone how to compare various objects?

View Tutorial          By: Peter at 2009-10-07 07:32:31

2. "Invalid Password at the jsp bcos RuntimeExce
View Tutorial          By: Ogah I. G at 2013-01-08 16:44:54

3. Its not working ave made a few adjustments to it t
View Tutorial          By: amg at 2011-11-04 13:48:09

4. There are 11 types of people.
Those who kno

View Tutorial          By: alphachap at 2011-03-07 10:53:44

5. this is the output i get.
Help me.
<

View Tutorial          By: shubham saxena at 2014-04-01 17:06:00

6. I discover unlimited calendar.this calendar use of
View Tutorial          By: Lalit Kumbhani at 2011-12-31 16:02:06

7. THNX RAMLAK..
HEY RAMLAK I HAVE A LOT OF DO

View Tutorial          By: Vinod at 2009-01-02 22:04:40

8. Hiiii

When I am executing

View Tutorial          By: Souvik Bhattacharya at 2008-08-18 00:21:31

9. When i run the program,Iam getting this

View Tutorial          By: anitha at 2008-12-17 21:37:36

10. i am try this codeing in vb . i am using nokia n73
View Tutorial          By: kanyaraj at 2010-02-09 19:10:10