Read the API for String , more specifically the length method.