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. thankyou Mr Ramlak for your help but please can yo
View Tutorial          By: yash at 2008-05-12 16:46:18

2. the example program is very simple to understand a
View Tutorial          By: Zubilu at 2010-10-06 00:19:13

3. WHY You are using such huge code for suspending an
View Tutorial          By: pavan kurariya at 2010-01-14 00:35:55

4. Can anybody tell.... what if condition is doing in
View Tutorial          By: Randhir Sambyal at 2013-08-26 06:37:25

5. hi friends i hav project work in this topic so pls
View Tutorial          By: sullan at 2011-05-08 12:08:56

6. Hi all

I am using getAttribute but

View Tutorial          By: Suvarna at 2012-01-12 06:56:55

7. if return type is different but parameters same do
View Tutorial          By: dodo at 2010-04-08 23:08:58

8. You should check out the new BonCode connector for
View Tutorial          By: Petro Donic at 2012-07-16 02:34:06

9. please would someone help me create a simple java
View Tutorial          By: christopher at 2012-12-05 00:32:50

10. Simple Codes please... I just wonder why does my p
View Tutorial          By: Joseph at 2009-11-12 05:37:50