Question: I'm working on a Java project. I'm wondering how can I right the code lines for user to input their age. If the user's input

I'm working on a Java project. I'm wondering how can I right the code lines for user to input their age. If the user's input age is equal to or greater than 21 year old. The system would print "Enjoy playing". And run the rest of the program. However, if the value is less than 21, the system will print out "Sorry! You are not old enough." And then will not run the rest of the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!