im a beginner in Java and I need the user to input a year month and day and then put it in the form of yyyy-mm-dd using the Date class but I keep getting the "week day, month, date, time, year"
this is part of the code
Scanner input = new Scanner(System.in);
PrintStream output = System.out;
output.println("Birth Year:");
int birthYear = input.nextInt();
output.println("Birth Month:");
int birthMonth = input.nextInt();
output.println("Birth Day:");
int birthDay = input.nextInt();
Date dateOfBirth = new Date(birthYear,birthMonth,birthDay);
System.out.println(dateOfBirth);
i need to print out the date the user put in can someone help me with this class please?