I am trying on how to print values from an array all to show up on a dialog using a for loop. Can anybody help me with this?
double[] dailyTemperatures; dailyTemperatures= new double[7]; for (int d = 0; d<dailyTemperatures.length; d++) { String t; t = JOptionPane.showInputDialog(null, "Enter daily temperature values:"); dailyTemperatures[d] = Double.parseDouble(t); }// end for loop for (int i =0; i <= 6; i++)
i want to print all my values in just one dialog box. I would rather use a for loop but if you guys can not tell me another way it is okay