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 totally disagree with Gerardo Saldí[email protected] i
View Tutorial          By: Shivesh at 2009-09-24 23:46:42

2. for ex

public class test()
{

View Tutorial          By: Anundhara at 2012-08-11 06:54:57

3. I can't compile the source with Dev-C++ 4.9.9.2, h
View Tutorial          By: ToKha at 2013-11-19 01:32:34

4. Yes, finaly toString start making sense to me, tha
View Tutorial          By: Ted at 2010-04-10 19:15:50

5. This is very useful article with clear understandi
View Tutorial          By: Manu Manker at 2014-03-14 05:49:26

6. import java.io.*;
class lastindexof

View Tutorial          By: arya at 2012-11-07 08:37:59

7. Hi Ramlak
I am trying to run your code.

View Tutorial          By: jainitya at 2011-05-04 12:26:16

8. can u plz send me jsf material in my gmail.
View Tutorial          By: rajesh at 2013-06-09 11:40:11

9. Excelente, y a pesar de que mi inglés no es
View Tutorial          By: Monica at 2009-03-24 13:53:51

10. helpful :)
View Tutorial          By: ravinder at 2012-03-22 11:52:19