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



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. Hi,
My problem is with daybook. In

View Tutorial          By: Priyesh at 2011-07-06 06:34:33

2. This is the coding that I wanted...
This is

View Tutorial          By: Damith at 2012-05-16 17:26:10

3. The site is too informative. I just like their imm
View Tutorial          By: Priyadarshi Tripathi at 2010-10-26 23:44:46

4. Helps very much. Thank you.
View Tutorial          By: Uwe at 2010-08-17 12:35:44

5. Can please send me codes to pass strings or text f
View Tutorial          By: bryan at 2009-12-29 05:59:21

6. hai.....people ..............


View Tutorial          By: spartan at 2009-08-08 08:42:35

7. sir i want how to write record into file and readi
View Tutorial          By: danny at 2011-12-23 16:30:26

8. Thank for your clear explanation
View Tutorial          By: htnga at 2009-04-05 18:43:25

9. thanks for your tutorial, but how to us it?

View Tutorial          By: Desman Gea at 2014-07-18 16:54:41

10. Good Example
View Tutorial          By: Naresh at 2015-02-03 07:41:40