0
In java, how to check whether the value entered by user is there in the constructor or not?
2 odpowiedzi
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?
0
I think what you need is exception handling.
https://www.sololearn.com/learn/Java/2175/
https://www.sololearn.com/learn/Java/2176/