samedi 4 avril 2015

Java searching for words in Strings separated by spaces

In my current project I'm given input from the user in a single String(example: ADD p1 premium), ADD- create a new account, p1- account name, premium- type of the account).


Until now this information was always given to me by different Strings( in this case 3 strings).


The only thing I know about the content is that it's divided by spaces, and that I'll be receiving 3 words.


Is there any method that searches for certain type of char in a string? Thanks


Aucun commentaire:

Enregistrer un commentaire