Reverse String In Java Using Function