comparison between 2 char[]

hello

i would like to compare 2 char[] and know if the 2 char[] are equal or not.

i have use something like that

boolean r;

r=gpib_list[index].name.equals(temp2);

// gpib_list[index].name is a char[] declare in another class

but r return always false even when the 2 char[] seems to be equals....

but i'm certainly doing something wrong or maybe there is another method. could you give me an advice

thanks a lot for your help

BR

[490 byte] By [Teo73a] at [2007-11-26 17:48:11]
# 1
Look up equals in Arrays API: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Arrays.html
Rodney_McKaya at 2007-7-9 5:00:31 > top of Java-index,Desktop,Core GUI APIs...
# 2
simplest way is with [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Arrays.html]java.util.Arrays.equal[/url]but if you need to special things to compare the objects, then you have to iterate through the entire array yourself.
Jasprea at 2007-7-9 5:00:31 > top of Java-index,Desktop,Core GUI APIs...
# 3
i'm a really dummy in java programming.and i don't know how to use the function you suggest me could you give me more detail please.thanks a lot for your kind help
Teo73a at 2007-7-9 5:00:31 > top of Java-index,Desktop,Core GUI APIs...
# 4

> i'm a really dummy in java programming.

> and i don't know how to use the function you suggest

> me could you give me more detail please.

Then you need to start here: http://java.sun.com/docs/books/tutorial/

After you're done, follow the link Rodney posted to find the method that does what you want.

Jasprea at 2007-7-9 5:00:31 > top of Java-index,Desktop,Core GUI APIs...