Basic User Input Validation in Java

preview_player
Показать описание
In this video we build upon the handling runtime errors video content by using a try and catch block to handle basic user input validation. We show how input from the keybaord through the Java Scanner class can fail if the user enters an incorrect data type and we develop a solution that uses String input, a loop and a try and catch block to solve the problem.

Look out the for the typo in the code comments and have a listen for the interuption from Google Assistant. Forgot to turn off my phone during recording......
Рекомендации по теме
Комментарии
Автор

Hey Stephen, so glad to have found your channel!! Your way of going through the process taking us through all the steps is not just teaching coding but showing proper programming mentality. I appreciate you!

affable.pebble
Автор

This video is so good and Stephen thank you.

aborda
Автор

Outstanding. Now I understand input validation. You should've taught my C++ class.

geraldinejns
Автор

Thank you! you really helped me get through a slump.

CRA
Автор

very detailed step by step! thank you for making this!

gabrielmiyamoto
Автор

I love how you explain things! It's very newbie friendly! I'm in an online program that doesn't really help me much. So, this video helps to fill in the gaps for sure!

desteniwhite
Автор

Very good job!
Input validation is very important in Java Application Security and you explained it very well.
I wish you had more video in Java Security

parisanikzad
Автор

Nice, exactly what I needed! Thanks for the detailed explanation!

Quadrt
Автор

Thanks, you explain coding at a good pace and fully explain what is going.

homemoviesandphotos
Автор

Again very good, clear and concise explanations and easy to follow

yhvwjym
Автор

Fantastic video. This really helped me out!

themanforallseasons
Автор

Very good at explaining and making it easy to understand the material. I really like your video and I really appreciate it.

jasonoh
Автор

My problem wasn't exactly what you were teaching ( I was trying to take in a String, use switch to check first ch upper/lower 'n' to quit, upper/lower 'y' to validate entry. ). However, you give such clearly spoken detailed lessons that I was able to drop the try/catch, work a while Boolean validation around my User Input & Switch, which finally gave me the result I was struggling to achieve. I was loath to ask for help & really wanted to get this on my own (even though I am obvious very green).Yet, I learned more than I was looking for as well as got what I needed done. This is just a long-winded thank you very much!

linuxlavender
Автор

This video was highly informative and very helpful, thank you! :)

kalicorrell
Автор

Excellent video. Thanks for breaking down each step with a detailed explanation. What if Input Mismatch Exception was used in the catch parameters? That was the exception displayed when you originally entered a non integer input. Thanks!

stephendavol
Автор

How's possible you have only 1.11k subscribers!! Your content is amazing, thanks for saving me

thiagodarocha
Автор

Thank you so very much!!! My code is perfectly working now for "float data type validation"; and I added a non-negative condition as well. Wanna cry happy tears !!!

sabrinamimouni
Автор

Helpful video. Thanks. Make the video if possible, because they are very useful. And Thanks again:)..

colea_
Автор

Wonderful video. What program is this on?

markpaul