0
我想驗證該字符串並確保該字符串僅包含字母。驗證該字符串是否僅包含字母
這是我的計劃,其他的部分是讓印刷
String myString = "hellothisisastring";
String reg="[a-zA-Z]";
if(myString.matches(reg))
{
System.out.println("Yep!");
}
else
{
System.out.println("Nope!");
}