<<< Array length | Index | Computing the average example >>> |
Code that prints an array of prices to the console
double[] prices = {14.95, 12.95, 11.95, 9.95}; for (int i = 0; i < prices.length; i++) { System.out.println(prices[i]); }
The console output
14.95 12.95 11.95 9.95
<<< Array length | Index | Computing the average example >>> |