Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparing Strings

 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which the fastest way to compare two strings
S1="JAVA RANCH" & S2="JAVA RANCH"
S1.equals(S2) or S1.intern()==S2.intern()
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm closing this duplicate post.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic