System.out.println(s2 == s1);
This will print true.
Reason is when you execute the intern() method it returns the referance of one of the objects that are existing in the String pool mantained by the JVM for reuse .
So,
First s1 is created pointing to "JavaWorld" and also a referance of this object is kept in JVM String pool.
Next a new String object is created s2 - but then an intern() is performed on it which forces it to look for object referances kept in the pool.
So it points that referance in the pool instead of the newly created object.
Since now both s1 and s2 point to the same memory location they return true.
-----
Shivani.