Comment on Tutorial - equals( ) Versus == in Java By Mashoud



Comment Added by : Fins

Comment Added at : 2011-12-14 04:40:09

Comment on Tutorial : equals( ) Versus == in Java By Mashoud
Hi Guys, thanks for sharing this... I have some more doubt.

1. String s1= new String("Hello");
String s2="Hello";

Here, whether s2 will point to the same location as s1?

2. String s1="Hello";
String s2=new String("Hello");

What will be the output of these 2 scenarios?


View Tutorial



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. Hey your help is really appreciated but I dont und
View Tutorial          By: farid khan at 2012-03-21 15:59:53

2. Thanks so much, this was extremely helpful and rea
View Tutorial          By: gabrielle at 2013-10-04 22:07:17

3. any body who have a full source code of the progra
View Tutorial          By: progra at 2013-02-11 12:37:34

4. Hi, thank you so much for this. I am going to give
View Tutorial          By: Eddie at 2011-02-21 14:10:04

5. Hi,
I'm having a problem with the above cod

View Tutorial          By: sushanth at 2015-05-04 07:32:17

6. Thank you so much Eric Giguere.
You save me

View Tutorial          By: ijAcK D at 2009-10-18 05:02:48

7. you have helped me so much! thanks a lot ya! i rea
View Tutorial          By: NATION WHITE CHIRARA at 2013-09-19 07:53:57

8. i get this error too but i dont start the mysql se
View Tutorial          By: Head at 2009-02-27 00:47:43

9. Very nice
View Tutorial          By: sharath at 2012-07-17 11:31:20

10. hi its working nice,can u plz help me how to fetch
View Tutorial          By: Manju gowda at 2014-02-21 07:23:44