Input Validation | How to validate input in coding.

Published: 12 December 2021
on channel: Crazy Programming
65
6

In this video, an exam weightage calculator is created in Netbeans IDE, as the requirements of this program are described below:

(Turn on caption for detail)

Question (InputValidation):

Write an input validation loop that keeps prompting the user to enter age which is in the range of 18 – 50 and salary which is greater than 0.

WRITE YOUR ANSWER BELOW THIS LINE


Scanner input = new Scanner (System.in);
System.out.println (“Enter your age between 18 - 50 :”);
int age = input.nextInt();
System.out.println (“Enter your salary (should be greater than 0):”);
int salary = input.nextInt();
.
.
If you need any help in java programs then contact me through the email given below:
crazy.programming.life@gmail.com
.
Don't forget to subscribe to "Crazy Programming".
.
.
Thanks for watching.


On this page of the site you can watch the video online Input Validation | How to validate input in coding. with a duration of hours minute second in good quality, which was uploaded by the user Crazy Programming 12 December 2021, share the link with friends and acquaintances, this video has already been watched 65 times on youtube and it was liked by 6 viewers. Enjoy your viewing!