Tuesday, 31 December 2019

Java comparison with == of two strings is false?

String parts is String[6]:





["231", "CA-California", "Sacramento-155328", "aleee", "Customer Service Clerk", "Alegra Keith.doc.txt"]


But when I compare parts[0] with "231":



"231" == parts[0]



the above result is false,



I'm confused, so could anybody tell me why?

No comments:

Post a Comment