Code: Select all
java:17: error: array required, but Date found System.out.println(monthName[index]);
< /code>
Ich habe versucht, so detailliert wie möglich zu sein. < /p>
import java.util.Scanner;
public class Driver {
public static void main(String[] args)
{
Utility input = new Utility();
final int MONTH_NAMES = 12;
int[] month = new int[MONTH_NAMES];
Date monthName = new Date();
{
System.out.println(input.queryForInt("Enter the number for a month ")) ;
}
for (int index = 0; index < 12; index++)
System.out.println(monthName[index]);
}
}