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. Hi Everyone, i tried the code. im using this code.
View Tutorial          By: sourabh at 2011-09-09 12:42:02

2. There is no comparison of performance in the artic
View Tutorial          By: Tomas at 2010-01-17 05:53:48

3. Really a great article!
I have some questio

View Tutorial          By: ron at 2010-03-30 01:37:12

4. very thanks... It's very useful to me...
Th

View Tutorial          By: swathi. M at 2015-01-02 16:32:19

5. I Want more Advanced Case Shown...
I Know E

View Tutorial          By: Electron at 2009-11-23 02:32:07

6. Hi I too need the full program for understanding
View Tutorial          By: Sumanth at 2010-10-03 16:02:46

7. nice tutorial
View Tutorial          By: Raman at 2014-11-13 07:47:11

8. plz any one send me the code for sending and recei
View Tutorial          By: ankush at 2013-09-20 07:47:27

9. imgView.setBackgroundResource(R.drawable.ani); i g
View Tutorial          By: mamu at 2012-10-18 14:41:31

10. I request to java beacuse i hope java language

View Tutorial          By: jeey at 2011-07-06 07:59:07