Find on which day you born using java code

Do you no on which day you born
No, you can find the your day for the birthday using java Date() function
Here is the code for that

import java.io.DataInputStream;
import java.util.Date;

public class FindYourBornDay {
public static void main(String[] args) {
try {
DataInputStream in = new DataInputStream(System.in);

System.out.print(“Enter Birth year :- “);
int year = Integer.parseInt(in.readLine()) – 1900;

System.out.print(“Enter Birth Month :- “);
int month = Integer.parseInt(in.readLine()) – 1;

System.out.print(“Enter Birth Day Date :- “);
int day = Integer.parseInt(in.readLine());

Date date = new Date(year, month, day);
int yourday = date.getDay();

switch (yourday) {
case 0:
System.out.println(“Your birth day is on Sunday”);
break;
case 1:
System.out.println(“Your birth day is on Monday”);
break;
case 2:
System.out.println(“Your birth day is on Tuesday”);
break;
case 3:
System.out.println(“Your birth day is on Wednesdy”);
break;
case 4:
System.out.println(“Your birth day is on Thursday”);
break;
case 5:
System.out.println(“Your birth day is on Friday”);
break;
case 6:
System.out.println(“Your birth day is on Saturday”);
break;
default:
break;
}

System.out.println();
} catch (Exception e) {
System.out.println(e);
}
}
}

output of the above code

Enter Birth year :- 1985
Enter Birth Month :- 12
Enter Birth Day Date :- 25
Your birth day is on Wednesdy