答案 0 :(得分:1)
简单:
boolean isEntirelyUppercase(String s)
{
return s.toUpperCase().equals(s);
}
boolean isEntirelyLowercase(String s)
{
return s.toLowerCase().equals(s);
}
boolean isPunctuationMark(String s)
{
if(s.length() != 1)
return false;
char c = s.charAt(0);
return !Character.isLetterOrDigit(c);
}