the following fails at compile time and says they’res a duplicate function,
void saveData(ArrayList<String> a){
if(click){
for(int i=0;i<a.size();i++)
output.println(a.get(i));
saveTo();
}
};
void saveData(ArrayList<Float> a){
if(click){
for(int i=0;i<a.size();i++)
output.println(a.get(i));
saveTo();
}
};
however the following works no problem,
void saveData(String []a){
if(click){
for(int i=0;i<a.length;i++)
output.println(a[i]);
saveTo();
}
};
void saveData(float []a){
if(click){
for(int i=0;i<a.length;i++)
output.println(a[i]);
saveTo();
}
};
I’m thinking this is probably due to the logic of the logic of processing, but am I perhaps missing something? This isn’t really and issue as I can simply process the information outside the file saving function but as it threw an error I was just intrigued.