Java 프로그래밍 (1) 썸네일형 리스트형 거꾸로 해도 같은지 검사하는 프로그램 (Java 버전) public class Test { public static void checkReservedString(String string) { System.out.format("입력하신 문자열은 [%s] 입니다.\n", string); String temp = ""; for (int i = string.length() - 1; i >= 0; i--) temp += string.charAt(i); if (string.equals(temp)) System.out.println(true); else System.out.println(false); } public static void main(String[] args) { checkReservedString("123212"); } } 헉.. 자바로 하니까 왠지 엄청 .. 이전 1 다음