I’m writing a program that asks the user to enter their birth date. For it, I’m not suppose to know how the numeric data is to be enter except that there is one white space between the month, day and year. Right now, I have it reading the date as a String on one line and I am unsure how to do it so it meets the specifications of the program.
Using nextInt() seemed like the way to go but I’m not sure.
If you’ve got a string containing:
You might also use the split method, so given your string “readfrominput”: