Vote count: 0
int[] array=new int[10];
int k =0;
double d;
public void run(int value){ //this method will run ten times
result[k]=value; //replace null by value(in the parameter)
k++; // every times,k++,so i can replace every null in array by values.
d=mean(result);//call another method
}
public double get(){
//i want return the value of d
}
how can i get the value of d, or is there any other way to do that?. i try to create a method, and return d,so i could use d later.
asked 18 secs ago
how to access a variable in another method
Aucun commentaire:
Enregistrer un commentaire