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. worked for me thanks.
View Tutorial          By: dem125 at 2010-08-03 23:30:32

2. plz send me 1 ex that will explain how to use conn
View Tutorial          By: abhijit marne at 2011-12-09 06:32:07

3. Your post was very informative... Thanks a lot. My
View Tutorial          By: Rohit Shaw at 2010-04-12 04:29:02

4. this is good, but i need a simple program about sh
View Tutorial          By: ramalakshmi at 2011-01-05 03:38:26

5. Excellent example Jagan. By the way I have a quest
View Tutorial          By: Shrihas at 2012-01-07 14:12:48

6. can you please e mail me a code about hotel reserv
View Tutorial          By: princeton at 2008-09-19 02:32:13

7. good......
View Tutorial          By: Sudip Khatiwara at 2010-04-05 22:31:06

8. Thank you sir this is a nice example/
View Tutorial          By: Techbymak at 2013-01-08 09:51:54

9. i'm a student and new to all these HTML and JSP.
View Tutorial          By: sillee at 2009-08-13 03:22:14

10. Nicely explained concept. Thankx.
View Tutorial          By: Raghvendra at 2013-01-17 07:48:18