I have a class with ' int = dia, mes e ano
' and in the other I'm calling them. But it caught my attention was that when I put the value '08' says
'The literal 08 of type int is out of range'.
But when I put 07, compile without problems.
I'll enter the codes:
public class Data {
int dia;
int mes;
int ano;
}
public class DataTeste {
public static void main(String[] args) {
Data nascimento = new Data();
**nascimento.dia = 08;**--este valor da erro, mas 07 p/baixo valida.
nascimento.mes = 03;
nascimento.ano = 1989;
}
}