Question: Write a Java program NameInput.java with the behavior shown below. The user input should be after the colon. Enter first name: Sam Enter last name:
Write a Java program NameInput.java with the behavior shown below. The user input should be after the colon.
Enter first name: Sam
Enter last name: Student
Enter age: 18
Enter birth month: September
Enter birth day: 15
Enter birth year: 1997
As an output, you should print Sam Student is 18 years old and was born on September 15, 1997. (without the quotes).
I think my teacher wants us to write this code using methods but I'm not sure how to do so using import java.util.Scanner. Thank you in advance.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
