+ 1
Hi guys! I got a question. How do you secure the entry in a program you write in c or java?
like if you ask the user to enter a number of type int, how do you prevent the user to enter for example a string, a name or a double? like if I want to get only int: Scanner number = new Scanner(Sustem.in); int UserNumber = number.nextInt; I want such a program to give an error message once the entry is not an "int value "
4 Respostas
+ 4
by providing acess specifiers we will give security like private public protected default in the security isssue java is more helpful
0
ok.
I'll make research about that
0
thanks anyway buddy!
0
ok I see that.
thanks for your contribution