Question: PLEASE PROVIDE A CODE IN JAVA PLEASE DO IT AS SOON AS POSSIBLE Prompt the user to enter age. If the age is less than
PLEASE PROVIDE A CODE IN JAVA
PLEASE DO IT AS SOON AS POSSIBLE
Prompt the user to enter age. If the age is less than 18, throw an exception with the message "You are underage, cannot vote yet". If the age is 18 or more, display the message "Congrats, you can vote!" and another message "Processing continues...".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
