• + 2 comments

    There won't be any problem iof we check against -1. Becasue what you are telling is correct for a String comparison. Here it is character.