PDA

View Full Version : help me in string comparison in java


flashes
2-15-06, 05:06 AM
Can anybody help us about string comparison in java,,,

We came to know about two methods but we find a problem with that.

we compared using "equals and compared to " operations.

in the comparison,

s.equals(t) the comparison takes place only when either s or t is initialised,(say s="forum")

but in s.equals(forum[i]) (forum[i] is the array) false is returned even when both are equal.

hope you understand our problem...

awiating for your help...

Kitchensink108
2-15-06, 05:15 PM
are you saying that forum[i] is an entire array, not just an array element (forum[i] = "forum")?