Home > Back-end >  Why can't class defined in the array declaration first, then apply space
Why can't class defined in the array declaration first, then apply space

Time:12-18

 public class RePSO {

Private static int numParticles=50;//particle number
Private static int dimension=3;//particle dimension

Private static double [] [] pBest;

Public RePSO (int dimension) {
RePSO. Dimension=dimension;
}

PBest=new double [numParticles] [dimension];
}


The above complains: after the tag should be VariableDeclaratorId
  • Related