Thread: Quiz Time
View Single Post
  #35 (permalink)  
Old 05-08-2008, 12:25 PM
sanjeevtarar's Avatar
sanjeevtarar sanjeevtarar is offline
Senior Member
 
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
sanjeevtarar is on a distinguished road
Quote:
Originally Posted by rjuyal View Post
You will get you banana back as your gift, if you give us the example

Using String, use '==' and 'equals' but answer should be different.

Please sanjeev, if you have some example then post it here


Code:
if("String".trim() == "String ".trim())

i guess the answer should be same again.

Both will become "String" after trimming, and as String are interned both will have same reference.

Rakesh.....see example in reply #31
__________________
sanjeev,संजीव
Reply With Quote