posted 17 years ago
1. int[] a={1};
2. int[] b={1};
3. a.equals(b);
Here a and b is array object,it has no content. So in line it compares to see whether they are same object,but they are different object. So the result is false.
if you compile this line,
a[0].equals(b[0])
the result will be true,here it compares the content of int array