Reverse A String In Java Using Function