ragardin strings:
class s11
{
public static void main(
String[] args)
{
String s11 = new String("H");
String s12 = s11;
System.out.println(s11==s12);
}
}
the output is true.
shldnt it be false.
s11 creates a new string object with new.
and s12 is assigned s11.
but s12 is in the string pool and s11 is a new string
so how does this result true using ==.
pls clear this
thx
regards
Kamal