Q1: Write a Java program that will display different messagesdepending on your age.
Your program should ask the user for his/her name and their agein years
and give one or more answers from the following ones below:
- if the age of the user is less than 16, the program shouldprint on the screen “You are not allowed to drive at themoment”.
- if the age of the user is less than 18, the program shouldprint on the screen “You are not allowed to vote at themoment”
- if the age of the user is less than 25, the program shouldprint on the screen “You are not allowed to rent a car at themoment
- if the age of the user is greater than or equal with 25, theprogram should print on the screen “You can do anything that islegal”