My two cents: if you want to check whether the values are identical at each index then it is probably easiest to use Arrays.equals()

Copy code

  1. public int [] a,b;

  2. void setup(){
  3.   
  4. a= new int[3];
  5. b=new int[3];
  6. a[0]= 0;
  7. a[1]= 1;
  8. a[2]= 2;
  9.  b[0]= 0;
  10. b[1]= 1;
  11. b[2]= 2;
  12.  
  13.  if (Arrays.equals(a,b)) println("match");  
  14. }