how to check if a string only contains letters in java code example
Example 1: check if a string contains a character java
string.indexOf('a')
Example 2: java if string contains character
if (string.contains(character)
string.indexOf('a')
if (string.contains(character)