yet again right?
Ok, so this time, the task is to write an application that asks the user for his or her birth date and replies with the day of the week on which they were born.
So here is the code i have.
package Ch2Scanner;
import java.text.SimpleDateFormat;
import java.util.*;
public class Ch2Scanner {
public static void main(String[] args) {
Scanner scanner;
scanner = new Scanner(System.in);
SimpleDateFormat sdf;
sdf = new SimpleDateFormat("EEEE");
String birthday;
//prompt the user for input
java.util.Date bdate = java.sql.Date.valueOf("1990-07-21");
System.out.println("Enter your birthday here:");
birthday= scanner.next();
System.out.println("What is your birthday?" + birthday + "." );
}
}
ok, so when i run it, it comes up with, enter birthday, so i do and hit enter. Then it just reads back what I entered. I need it to say saturday. The TA (who can hardly speak english) said something about using the SimpleDateFormat and creating an object for it, then implementing it, and i thought i had..but i guess not. Any help would be great. Thanks in advanced.