nope that doesn't work String a=new String("a"); String b=new String("ab").substring(0,1); b.inter()==a.intern()
that works. On 2/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
On 2/13/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > > So i will make it identity equal for all objects except String but isnt string identity guaranteed for equal strings because the jvm pools them? so String a=new String("a"); String b=new String("ab").substring(0,1); b==a -igor