I'm learning programming and I was working on arrays, but in this method (which is in a class) for some reason when it compiles it shows me a "Error: Syntax error on token(s), misplaced construct(s)" message.

This is the code:

```
    public int[] ByN(int[] vector){
      int Blancas = 0;
      int Negras = 0;
      int[] ByN = new int[2];
      combinacion temporal = new combinacion(tamlog);

      temporal.copiar(vec);

      for (int i = 0; i < tamfisico; i++){
        int j = 0;
        Boolean Tof=false;

        While ((ToF == false) && (j < tamfisico);){
          if (vector[i] == temporal[j]){
             Blancas ++;
             temporal.borrar(j);
             j--;
             t--;
             ToF= true;
          }
          j++;
         }
      }

      for (int i = 0; i < tamlog; i++){
        if (vec[i]== vector[i])
          Negras++;
     }
      Blancas = Blancas - Negras;
      ByN[0]= Blancas;
      ByN[1] = Negras;
      return ByN;
     }

```

It is meant to consider 2 int arrays and count how many are in both - how many are in the exact same position.

The problem seems to be in the first for not sure why...