int day = Integer.parseInt(request.getParameter("day")); // 25
int month = Integer.parseInt(request.getParameter("month")); // 12
int year = Integer.parseInt(request.getParameter("year")); // 1988
System.out.println(year);
Calendar c = Calendar.getInstance();
c.set(year, month, day, 0, 0);
b.setDob(c.getTime());
System.out.println(b.getDob());
L'output è:
1988
Mercoledì 25 gennaio 00:00:08 IST 1989
Sto passando 25 12 1988
ma ottengo 25 Jan 1989
. Perché?