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. thank you. its very useful :)
View Tutorial          By: Farhanna at 2013-05-22 05:33:46

2. Gud one for beginners
View Tutorial          By: puneet at 2011-07-20 05:00:42

3. hello friends .. am looking for the java code that
View Tutorial          By: ahmed at 2008-09-18 21:48:21

4. Excellent article. Please make the email id of the
View Tutorial          By: Rajita at 2008-03-25 09:31:27

5. I've been learning C++/C for the past year or so,
View Tutorial          By: William Semple at 2013-01-05 17:53:30

6. I have a problem with PortInUseException. I wrote
View Tutorial          By: robert at 2009-12-28 08:37:49

7. what is the return type for clicker method? The pr
View Tutorial          By: Gautam at 2013-10-14 15:36:27

8. it is nice but please give simple example like are
View Tutorial          By: red at 2009-12-03 23:07:37

9. how can i give me a assign value to mutldimentiona
View Tutorial          By: shinde datta at 2013-01-12 10:41:15

10. i have clear that notify and wait
but where

View Tutorial          By: pp at 2009-06-29 06:12:13