JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
public class RandomDate
{
public static void main(String[] args) {
String[] m = {"gen","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"};
String[] d = {"mon","twe","wed","thu","fri","sat","sun"};
int a = (int)(Math.random()*12);
int b = (int)(Math.random()*7);
System.out.println("Month: "+m[a]+", day: "+d[b]);
}
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run