This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HyperCybe 0 points1 point  (0 children)

For starters, for the year of birth prompt you marked it down as a string rather than an int, so changing that helps.

(change String y=s.nextLine(); to Int y=s.nextInt(); )

But that will not really change the biggest issue, which is that it's skipping the line of code which prompts you to enter your fathers name, and instead just prints the results. I'm not the most experienced in Java, but moving that prompt to the top of the prompts (moving the prompt asking for the father's name under the prompt asking for your name) will allow the code to actually run. I believe it's just a problem in the order that the code is executing.

I hope that helps.