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



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. I have downloaded all the files
SMSClient.j

View Tutorial          By: Sanjay at 2010-06-29 04:48:16

2. please gave us simple difference between structure
View Tutorial          By: vishal at 2011-12-18 13:33:17

3. if the number is for exemple 00025478 it return a
View Tutorial          By: ahmed at 2015-02-11 12:02:45

4. I need a sample example using checkbox in struts.t
View Tutorial          By: Nandhu at 2011-02-25 07:45:39

5. Excellent !...That explains my long-term question
View Tutorial          By: Vineeth at 2012-02-01 03:50:21

6. Your solution is really helped me. Thanks for your
View Tutorial          By: Rajakumar at 2010-05-31 06:05:53

7. I wanna to name ,subject and marks of every subjec
View Tutorial          By: raveesh yadav at 2012-10-13 19:56:47

8. Hi VIKRAM, You cannot use your sim card number the
View Tutorial          By: Ramlak at 2007-03-29 00:38:55

9. I got Error...Why it is happen..??


View Tutorial          By: Dineth at 2011-07-15 16:54:31

10. I am getting this exeception when trying to send m
View Tutorial          By: praveen at 2012-12-27 11:15:14