after,
line = reader.readLine();
I want to see if the user typed in an integer, anything else typed in can be disregarded.
i.e
Type Something: dk39ko3 <---(That would be disregarded)
Type Something: 3322.87 <---(That would be disregarded)
Type Something: hello <---(That would be disregarded)
Type Something: 11245 <---(This would be an int)
Type Something: 11234e <---(That would be disregarded)
What can I use that will take a string then go character by character to see if I have all digits (no letters).
I ideas would be greatly appreciated.
line = reader.readLine();
I want to see if the user typed in an integer, anything else typed in can be disregarded.
i.e
Type Something: dk39ko3 <---(That would be disregarded)
Type Something: 3322.87 <---(That would be disregarded)
Type Something: hello <---(That would be disregarded)
Type Something: 11245 <---(This would be an int)
Type Something: 11234e <---(That would be disregarded)
What can I use that will take a string then go character by character to see if I have all digits (no letters).
I ideas would be greatly appreciated.