public static void checkNullYoungEun(String s) {
String[] trans;
int transLength = 0;
trans = s.split("");
for (int i = 0; i < trans.length; i++) {
if(trans[i].matches("^[a-zA-Z가-힣]$"))
transLength++;
else if (trans[i].matches("^[0-9]$"))
continue;
else
continue;
}
if (transLength > 0) System.out.println("이게 무슨짓이야");
else if (transLength == 0) System.out.println("죠");
}
반응형
'잡지식' 카테고리의 다른 글
| JDK 8에서 JDK 21로 업그레이드하기: 점검 포인트와 마이그레이션 순서 (0) | 2026.06.04 |
|---|---|
| 톰캣오류 - At least one JAR was scanned for TLDs yet contained no TLDs. (0) | 2019.05.01 |
| JAVA JDBC/DBCP/JNDI (0) | 2017.06.06 |
| 스크립트 단에서 쿠키제어 (0) | 2017.02.24 |