i want to passing a data from a method but in array.. some error occur like array required but double found and incompatible type.. i don't know how to do it..help me anyone...
example:
public double getFood(Date date, double AA, double BB, double CC)
{ }
// below is in main program
cat c = new cat();
double food = c.getFood(date,aa,bb,cc);
String str="";
for (int i=0;i<5;i++){
str = food[i];
System.out.println("cat food: " +food[i]);}
error occur when i use index in for statement. why??