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



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. here is one more inner class example
public

View Tutorial          By: shahalam shaikh at 2012-02-13 21:08:30

2. I have a computer science lab final on tuesday (09
View Tutorial          By: kudas at 2009-06-07 10:55:06

3. hi I want to send SMS to mutiple no.s. Is it possi
View Tutorial          By: gaurav at 2011-05-17 09:54:12

4. I came to know about the basic concepts here but I
View Tutorial          By: Amit Gorvadiya at 2015-09-23 06:18:37

5. my answer for this Question is :

#i

View Tutorial          By: Tahani at 2011-04-26 11:55:34

6. thanks a lot fo the help offered.
View Tutorial          By: Douglas [email protected] at 2012-10-31 05:37:04

7. Error loading SolarisSerial: java.lang.Unsatisfied
View Tutorial          By: Rahul at 2008-09-09 04:05:35

8. I am new to this concept..It is really very useful
View Tutorial          By: karthiga at 2013-01-02 11:20:38

9. great material for language
View Tutorial          By: hafiz at 2015-03-24 12:18:45

10. This Example program is very useful.
good w

View Tutorial          By: sathya at 2008-03-28 02:21:41