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. pritnt
1 2 3 4 5

View Tutorial          By: osama at 2013-02-05 03:16:15

2. It takes me time to understand the process of the
View Tutorial          By: Abdullah Ibrahim at 2012-04-11 00:38:23

3. in my case the culprit is xdebuger dll version 2.0
View Tutorial          By: putra at 2009-12-18 00:39:42

4. Thankx, the information was of great use, I apprec
View Tutorial          By: sachin at 2008-12-13 03:37:11

5. Very Helpful.
View Tutorial          By: nfahem at 2012-05-09 10:50:29

6. Plz show me how to use main method reccurssively p
View Tutorial          By: Jyoti Bankar at 2011-07-14 10:31:53

7. plz xplian robust in a simple way and what is dyna
View Tutorial          By: tintu at 2011-12-01 08:21:25

8. This works great, just remember to add <uses-pe
View Tutorial          By: Nick at 2012-06-20 07:37:15

9. Thank you for a great explanation now I'm in the l
View Tutorial          By: C++Noob at 2011-12-22 04:43:31

10. Its very clearly explained.
View Tutorial          By: sowjanya at 2013-10-04 09:26:04