Question d’entretien chez PayPal

String reverse without using method?

Réponse à la question d'entretien

Utilisateur anonyme

22 oct. 2011

public static String reverse(String s) { int length = s.length(); StringBuffer sb = new StringBuffer(length); for(int i = 0; i < length; i++) { sb.append(s.charAt(length - 1 - i)); } return sb.toString(); }

3