I have two double arrays and the third double array contains the difference % between them Difference is ((Array1[I]-Array1[I])/Array2[I])*100 but unfortunately I have an empty value in Array2. How can I write the code? I tried the following: Year1Year2percentage
for (int I =0;i<Brandsname.length;i++) /////brandname is the first string array
if(Array2[I]>0)
{
Year1Year2percentage=((Array1[I]-Array1[I])/Array2[I])*100;
}
else if(Array2[I]=null)
Difference.add(0);
}
}
Aucun commentaire:
Enregistrer un commentaire