In java, how to check whether the value entered by user is there in the constructor or not? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In java, how to check whether the value entered by user is there in the constructor or not?

17th Nov 2019, 12:55 PM
Harshita Shreya
Harshita Shreya - avatar
2 Answers
0
Constructor are used set for some default values... So it is used to set values, after that you can check. so then why you need check values before setting ? Question is confusing.. Can you explain a bit more ...? edit: Harshita Shreya you mean how to check the type of input entered is equal to what you required or not?
17th Nov 2019, 1:25 PM
Jayakrishna 🇮🇳
18th Nov 2019, 10:17 AM
Denise Roßberg
Denise Roßberg - avatar