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. excellent
View Tutorial          By: santosh at 2012-08-28 06:12:44

2. Hi, you put a semicolon after "int main()&quo
View Tutorial          By: noel4037 at 2009-12-28 06:40:17

3. sir every time we are using this.wedth(for example
View Tutorial          By: praveen kumar at 2011-06-28 01:33:44

4. HELP ME HOW TO ANALZE THE PROGRAM??????????
View Tutorial          By: MICHELLE FLORES at 2009-01-21 23:24:52

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

6. Good
View Tutorial          By: PRANJAL at 2015-08-14 16:38:57

7. I'm coding a webservice and this is exactly what I
View Tutorial          By: Cristian at 2014-11-14 12:52:34

8. not working on mozila firefox 3.1. I tested it.
View Tutorial          By: sushma at 2009-10-08 00:07:47

9. i run this program. its not showing any runtime or
View Tutorial          By: anand sp at 2011-03-07 10:11:37

10. This site is an Excellent Choice for lerners.Thank
View Tutorial          By: Sravanthi at 2011-06-28 06:20:35