Domanda di colloquio di Oracle

Program to reverse a string

Risposte di colloquio

Anonimo

13 mag 2017

It should be i-- in for loop

8

Anonimo

13 mag 2017

public void reverse(String str) { String reverse=""; for(int i=str.length-1;i>=0;i++) { reverse = reverse+str.charAt(i); } } }