Minggu, 12 November 2017

Tanggal Array Dengan JAVA

public class arrayla{
public static void main (String[]args){
String []mon = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Des"};
int []day = {31,29,31,30,31,30,31,31,30,31,30,31};
 for(int i=0;i<mon.length;i++){
 System.out.println(mon[i]+" mempunyai "+day[i]+" hari");
}}}

Tidak ada komentar:

Posting Komentar