Well as the title says.. I have a feeling I did something wrong in my code.
import java.util.Scanner;
import java.util.Calendar;
public class AgePrompt
{
public static void main(String[] args){
Scanner userInput = new Scanner(System.in);
String age;
System.out.print("Enter your date of birth here: ");
age = userInput.next();
String myDate =
java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());
System.out.println("Your age is: "+myDate);
}
}
So where did I go wrong?