I want to print out the values in this array of sorts with each value being comma separated in java. However, I do not want my last value to have a comma after it.
for (double val : output.getPvalues())
{
System.out.print(val + ",");
}
Right now, my output looks like this and I don't want the comma at the end.
0.3151985084814564,0.12439565272818136,0.08395574717762709,
0.23648887465370277,0.13987884822617208,0.1316174439685804,
0.23774083903133078,0.14471871035755607,0.16040529724318148,
0.23138041484992727,0.12692146250237307,0.10444029009575935,
Sorry it's my first day in java, and I don't know how to find the length of this object. How can I do it?