Comment on Tutorial - equals( ) Versus == in Java By Mashoud



Comment Added by : vijay

Comment Added at : 2011-08-21 15:09:41

Comment on Tutorial : equals( ) Versus == in Java By Mashoud
what ll be result for s1==s2 and s1.equals(s2) for following cases?
1)String s1="hello";
String s2="hello";

2)String s1 = new String("Hello");
String s2 = new String("Hello");

3)String s1="hello";
string s2=s1;


View Tutorial



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 people,
for those getting the Time out

View Tutorial          By: Ramlak at 2008-05-08 08:28:29

2. how to set the report for particularn form feilds
View Tutorial          By: mathivanan at 2012-09-21 00:05:07

3. How to Use Code in my Page ? plz give me the sugee
View Tutorial          By: jaty at 2015-08-19 12:25:20

4. Nice ,Easy to understand
View Tutorial          By: Jomon at 2009-06-30 00:56:48

5. i am looking for the code which wiLL HAVE AFFECT I
View Tutorial          By: pooja at 2013-06-10 13:48:32

6. I had just copied the code & tried to execute
View Tutorial          By: dhananjay padalkar at 2010-02-13 19:20:27

7. this code should be commented I mean a lot of comm
View Tutorial          By: mmmm at 2012-03-31 00:44:41

8. sir the program is
error: error reading C:

View Tutorial          By: Yashovardhan at 2008-05-05 21:42:27

9. Great tutorial
View Tutorial          By: Stephen at 2014-07-21 12:08:32

10. The code gives the following exception :-
<

View Tutorial          By: swetha at 2009-03-12 07:19:23