Photon interview question

JAVA: 1) reverse a string, don't use reverse method 2) now reverse a string from user input

Interview Answer

Anonymous

May 21, 2021

1) on eclipse using for loop starting from the last character to first I got them one by one and saved into a new string and printed out to the console. 2) instead of given string I used Scanned to get input from user and the rest of the code is same