Answer:
double [] phoneBills = new double[12];
Step-by-step explanation:
Since the question has requested that an array be difined to hold phone bill for each month. Above declares an array that will hold floating point number (double) and it has been created to hold 12 values representing the months January to December
Values can be added in the array as shown in the program below.
public class PhoneBill {
public static void main(String[] args) {
String [] MonthName = {"January", "February", "March", "April", "May", "June", "July", "August",
"September", "October", "November", "December"};
double [] phoneBills = new double[12];
phoneBills[0] = 4.5;
phoneBills[1] = 4.5;
phoneBills[2] = 5.5;
phoneBills[3] = 6.5;
phoneBills[4] = 3.5;
phoneBills[5] = 5.5;
phoneBills[6] = 6.5;
phoneBills[7] = 7.5;
phoneBills[8] = 8.5;
phoneBills[9] = 4.5;
phoneBills[10] = 3.5;
phoneBills[11] = 7.5;
System.out.println("Months and corresponding phone bill");
System.out.println(Arrays.toString(MonthName));
System.out.println(Arrays.toString(phoneBills));
}
}
The output of this program is attached: