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. I am trying to execute the same code but still una
View Tutorial          By: Sona at 2015-06-11 18:35:13

2. ei! its me again..i badly need you help coz we are
View Tutorial          By: anne226 at 2009-02-11 10:24:21

3. Excellent. I got stuck in a huge project and was f
View Tutorial          By: Rahul Tiwari at 2010-12-08 22:40:29

4. XML Parsing - Simplified.
Thanks.

View Tutorial          By: Piyush at 2011-05-19 22:56:23

5. thanks for your code
could you send me the

View Tutorial          By: nocturne at 2009-01-09 01:57:05

6. package com.anand;

import java.sql.

View Tutorial          By: Anand at 2012-11-12 00:00:07

7. Best example to explain Inheritance. thankyou for
View Tutorial          By: Suresh Lilhare at 2010-05-14 09:10:27

8. how to send data one pc to another with java progr
View Tutorial          By: usman at 2011-05-14 01:31:31

9. package alphabets;

import java.util

View Tutorial          By: Nitish at 2013-01-25 04:06:38

10. class loop8
{
public static voi

View Tutorial          By: ankush singh at 2011-11-04 16:26:36