• StringBuilder 클래스를 사용하여 역순으로 변환

String word = "hello abc";
String wordReverse = new StringBuilder(word).reverse().toString();
System.out.println(wordReverse); 



cba olleh

 

+ Recent posts