Professional Documents
Culture Documents
{
public static void main(String args[])
{
//String str1="hello";
String str1=new String("hello");
if(str1==str1.intern())
{
System.out.println("str1 and its intern are same");
}
else
{
System.out.println("str1 and its intern are not same");
}
}
}