1
I’m trying this code, but it doesn’t work.
public class MesDias {
public static void main(String[] args) {
// Array String byte
String Mes = {Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez};
byte[] Dias = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
for (int x=0; x<Mes.length(); ++x)
for (int y=0; y<Dias.length; ++y)
System.out.println(Mes[x] + " " + Dias[y]);
}
}
Is it really necessary to do this? Why not use native classes that do this?
– user28595
Are the months in Portuguese or English? "Feb", "Apr", "May", "Aug" and "Dec" are in English, "Set" and "Out" are in Portuguese.
– Victor Stafusa
Yeah, months are mixed. I’ll fix it. Thanks, @Victor Stafusa
– Chewie75