lundi 20 avril 2015

How to check if a string consists of 2 integers with a blank space in-between

As the title states, i want to know how i can check if a string consists of 2 integers with a blank space in between them in Java.
As an example:
0 2, should return true.
0 abc, should return false.
abcsd, should return false.
And so on...

If it is to any help, I am getting my string from a text file with a buffered reader. Maybe there is a more direct and easier way?

Thank you in advance

Aucun commentaire:

Enregistrer un commentaire