* Visite o ALJUG - http://aljug.blogspot.com - Noticias sobre a comunidade java alagoana e do mundo * Visite o blog Mundo Gamificado www.mundogamificado.com.br - E vamos mudar o mundo! *

sábado, 30 de abril de 2011

Checking Strings

Hello everybody,

after a long time back here to write something about java in the past few years I have been posting on the blog along with Alanaljug Matthew to disclose further the community to give supportjava Alagoas and thus follow later with the group, but I will try to reconcile the post both here and aljug.
Today I will speak in check strings, sever this tip for those who tryto check the first name, for example, in an arraylist.
If you want to know if the name already exists in any one arraylist, for example, Jack then you will do the following line of code:

if (nome.startsWith ("John")) {/ / Do something};

The above means that if name starts with john he will return aboolean value, then you should seek medical treatment.


Okay, there is a tip for you!

Goodbye!

Nenhum comentário: