Write a Java function that reverses a string and write unit tests for it.
Anonymous
public String reverse_string(String first) { String[] result = ""; int size = first.length() - 1; int initial = 0; for(int i = size; i >= 0; i--) { result[initial++] = first.get(i); } return result; }
Check out your Company Bowl for anonymous work chats.