[Java예제] 문자열 역순 출력, 역순정렬
public static void main(String[] args) { char[] s={'j','a','v','a','p','r','o','g','r','a','m'}; System.out.println(reverseString(s,4,7)); System.out.println(reverseString(s,0,3)); System.out.println(reverseString(s,8,10)); System.out.println(reverseString(s,0,10)); } public static char[] reverseString(char[] s,int start,int end){ char[] reverse=s.clone(); char temp; for(int i=start; startjavago..
2016. 10. 19.