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



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. a big thanks!
View Tutorial          By: xamae at 2010-01-13 02:52:51

2. Hello,

Can you please send me the c

View Tutorial          By: criz at 2007-10-16 21:06:30

3. Programs are so good..!
i wish to say one t

View Tutorial          By: Shashikumar Misal at 2012-09-01 20:35:47

4. It's good but not easily understandable....
View Tutorial          By: koshal at 2010-12-19 23:32:05

5. Thanks a lot! simple and clear explanation! Great!
View Tutorial          By: Fabio Henrique at 2010-03-29 15:23:56

6. This tutorial is really good for beginners.It help
View Tutorial          By: Prabhat Kumar at 2007-04-09 05:02:02

7. EXACTLY COPIED BY "C PROGRAMMING" by DEN
View Tutorial          By: Aashish at 2012-06-06 17:56:36

8. thanks....good explanation...
View Tutorial          By: jiby at 2012-01-14 05:57:33

9. I am assuming you are using eclipse for your andro
View Tutorial          By: Ashley at 2011-07-18 00:34:04

10. It seems author has half knowlage
EJB main

View Tutorial          By: Aryan Siddharth Singh Gautam at 2010-03-22 03:40:11