Java Validation: Range Check Tutorial

Java Validation: Range Check Tutorial

Max O'Didily

7 лет назад

18,896 Просмотров

Java Validation: Range Check Tutorial

Greetings, today I shall be teaching you how to preform a range check in Java to help you get that A in your practical exam. We will be using 3 variables, one to store the value we are range checking, the minimum value and the maximim value. We pass these values into a method and check an inequality, if the user input is between return true if not then return false.

I will be uploading 1 video a day during the easter holidays so subscribe to be notified when I upload!
https://tinyurl.com/SubMaxODidily

Social media:
Instagram: https://www.instagram.com/mcod1999/
Twitter: https://twitter.com/mcod1999

Code used in this video: https://pastebin.com/LWHhVZPR

Тэги:

#Java #Java_Range_check #Java_validation #Range_check #java_range_check #range_check #WJEC #WJEC_Java #WJEC_A_level #WJEC_computer_science #WJEC_Computer_science_A_level #Computing #WJEC_computing #wjec_computing_Java #Max_O'Donovan #Max_O'Didily #java_range_check_turtorial
Ссылки и html тэги не поддерживаются


Комментарии:

@hannah-mariehession-evans3581
@hannah-mariehession-evans3581 - 07.02.2023 18:27

This is quite useful, would there be a way to apply this to someone entering data into a table?

Ответить
@jasminelianne8338
@jasminelianne8338 - 22.04.2021 12:55

how about if you have 2 variables?

Ответить
@angelazeta9448
@angelazeta9448 - 24.03.2021 11:07

thank you for this video :-)

Ответить
@NeKa..
@NeKa.. - 12.04.2019 13:55

Thanks for this. It helped me. However, what if the user input is not an integer? how would you ties the two checks- InputMismatchException and range check in a loop till we get the valid type (an int within range)

Ответить
@Kuya_Shawn
@Kuya_Shawn - 06.02.2019 08:21

Do you have a video tutorial on Switch statements?

Ответить
@Kuya_Shawn
@Kuya_Shawn - 06.02.2019 08:20

I really like your java tutorials! you're very in depth with your teaching which is very helpful. most of the other YT videos are very straight forward and so i sometimes question onto why they use that.

Ответить
@papagobseck3327
@papagobseck3327 - 25.02.2018 01:46

Would a range check be suitable for postcode text field or would you recommend a length check?

Ответить
@draaaaaven5808
@draaaaaven5808 - 12.11.2017 15:10

It was really useful

Ответить
@glitchedturtle
@glitchedturtle - 15.07.2017 03:37

ewww

Ответить
@sionway6497
@sionway6497 - 06.05.2017 03:10

You do tutorials 😂I had no idea

Ответить
@leckie4004
@leckie4004 - 09.04.2017 23:55

First

Ответить