java - For loop cannot convert from int to double[] -
for reading lot of lines i've made loop start reading line 0 way line 61166. if try compile file cannot convert int
double[]
though variables not integers. have done wrong? tbh beginner if it's java. school exercise
int m = 61166; int[] l = new int[m]; double[] p = new double[m] ; double[] q = new double[m]; (p = 0; p < m ; p++);
the issue trying use array loop index/incrementer. in theory, this:
int m = 61166; int[] l = new int[m]; double[] p = new double[m] ; double[] q = new double[m]; (p[0] = 0; p[0] < m ; p[0]++);
but don't think make program run way want too. think might want this:
int m = 61166; int[] l = new int[m]; double[] p = new double[m] ; double[] q = new double[m]; (int index = 0; index < m ; index++){ //perform operations on loop p[index] = //something q[index] = //etc... }
Comments
Post a Comment