a simple question what do you expect the out put to be, if you want it to be boolean it's a subject, but if you want it to be text like " Hello Hello" or " Hello s1==s2 then it will be a different issue to discuss.
Abbas. On Mon, Jul 20, 2009 at 6:32 PM, Rohit Bansal <[email protected]>wrote: > Let I had following code snippet, > String s1="Hello"; > String s2=s1; > System.out.println((s1==s2)+" "+ s1==s2); > > OUTPUT: false > > > Query: I need understanding of output...its strange for sure but true; > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
