Can you post the full code ? It ' s a bit hard to tell with just snippets . You can simplify the for loop to just int i 0 i numberOfLetters i , which removes the subtraction . If numberOfLetters is zero , then that subtraction would overflow , and that would cause an array out of bounds exception in the for loop . That ' s just speculation though . <| sep |> The problem is she turned it in before I knew she did and the professor requested a meeting . I have text message proof of her admitting guilt but I do not even think that will help this situation I feel like I am fucked <| sep |> Ce treaba ai tu totui cu ce a scris Papa de la Bellaggio . I know , da ' ce mie asta , ce mie asta , ce mie asta , ce mie o cana de la Starbucks .