Hi Guys,
I tried to Create a GUI that asks the user for a date in the range June 1, 1960 until today.
Return the day of week of the a chosen date.
For example if the user enters May 18, 2005 you would return Monday.
That is what I come up with, Any help please!!


import javax.swing.*;
//import javax.swing.JButton;
import java.util.Calendar;

class Date {

public static void main( String[] args ) {

String birthdate;

birthdate = JOptionPane.showInputDialog(null, "What is your birth date? (MM/DD/YYYY)");

Calendar now = Calendar.getInstance();

System.out.println("Current date : " + (now.get(Calendar.MONTH) + 1) + "-" + now.get(Calendar.DATE) + "-" + now.get(Calendar.YEAR));


String[] strDays = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thusday","Friday", "Saturday" };


birthdate = JOptionPane.showMessageDialog (null, "Current day is : " + strDays [now.get(Calendar.DAY_OF_WEEK) - 1]);
}
}