I'm somewhat new to java and I'm trying to get a string to return in reverse which takes a String parameter, str, for example the word "hello", I want to be able to output "olleh" the code I used was :
String result = " ";
for (int k = 0; k < string.length; k++);
result(length-1-i) = str(i);
I'm not getting the output I want so if someone can help me with this I'll really appreciate it.