In my program, when you enter the query menu, the user is asked for a series of data. When you reach the section where you enter the month of your birth this menu does not appear, the program is closed and the following exception appears:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 11
at CapturasDatos.main(CapturasDatos.java:63)
The section of the code that produces the error is the following:
String[] Mes = {"Enero","Febrero","Marzo","Abril","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"};
mes_opcion = (String)JOptionPane.showInputDialog(null,"Selecciona","MES DE NACIMIENTO",JOptionPane.QUESTION_MESSAGE,null,Mes,Mes[11]);
Why is the error?