employer cover photo
employer logo
employer logo

GSM Plus Infotech

Is this your company?

GSM Plus Infotech Interview Question

write a java program on how to reverse the string.

Interview Answer

Anonymous

Nov 17, 2020

public class Reverse. { public static void main(String[] args) { String string = "Dream big"; //Stores the reverse of given string. String reversedStr = ""; //Iterate through the string from last and add each character to variable reversedStr. for(int i = string.length()-1; i >= 0; i--){