Pergunta de entrevista da empresa Amdocs

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

Respostas da entrevista

Sigiloso

28 de abr. de 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

Sigiloso

26 de mai. de 2018

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

1