Pregunta de entrevista de Amdocs

How to code a program to get the reverse of a string?

Respuestas de entrevistas

Anónimo

28 abr 2020

//Reverse a String public class Reverse { public static void main(String[] args) { String s = "Selenium"; String rev =""; for(int i=s.length();i>0;i--) { rev =rev+s.charAt(i-1); } System.out.println(rev); }

2

Anónimo

26 may 2018

Wrote down the logic, explained the process and then wrote the code. They were expecting the same.

1