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. The example is wrong, because there are two sepera
View Tutorial          By: billGates at 2010-07-06 16:56:13

2. hi, the code is fine. i want this array to be decl
View Tutorial          By: deepi at 2012-04-26 06:08:36

3. hello, please i need a help.. i'm trying to make a
View Tutorial          By: Ludmila at 2012-12-10 17:56:00

4. can i using stack in microsoft access 2007
View Tutorial          By: pxin at 2015-03-24 05:45:56

5. This Tutorial Rocks!kip it up
View Tutorial          By: Chuck Chalc at 2010-04-22 02:44:11

6. good
View Tutorial          By: rajesh sharma at 2011-07-18 05:20:56

7. So inf0rmative!
View Tutorial          By: Pamela at 2008-11-08 07:29:24

8. Interfaces contains all abstract methods(with out
View Tutorial          By: Mahesh at 2012-11-09 06:14:47

9. Hey thanks for your tutorial.

But i

View Tutorial          By: Matze at 2013-07-19 16:08:46

10. Sencillo y directo. No se podía explic
View Tutorial          By: Eligio at 2013-09-03 05:26:35