Hi Guys,
I have a entry that uses keyboard.nextInt() is there a way to limit what it accepts and if its not right return a text string?
I have tried using If and else statements for some reason they don't seem to be working.
Any ideas?
Hi Guys,
I have a entry that uses keyboard.nextInt() is there a way to limit what it accepts and if its not right return a text string?
I have tried using If and else statements for some reason they don't seem to be working.
Any ideas?
Read the API doc for the Scanner class. I assume that the keyboard variable is an instance of the Scanner class.
Otherwise read the API doc for that class.
they don't seem to be working.
Please explain.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.