Jeroen,
Thanks for the reply.I tried various combinations of string comparison and here is what I observed.
Whenever the == operator is operating on string objects which perform concatenation using + operator, the result is false, else the result is true.
Guys, this is my observation feel free to point out any combination which might prove this wrong.
Below is the code I wrote to
test this, hopefully my fellow ranchers might benefit from this.
NOTE: the line x will result in true, because the concat function in String.java will check for string length which is zero in this case and will simply return
this which is str6 object itself.
Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.