Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Compareto versus equals performance for strings equality

807606Apr 26 2007 — edited Apr 26 2007
Hi
Just wanted to know whether compareto and equals method performance for checking whether the two strings are equal or not .

Which one is good with respect to bytecode , speed performance.

Im not asking for the difference, only asking which one is good to use most number of times for comparing two strings for equilaty.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2007
Added on Apr 26 2007
7 comments
460 views