android - rotate string from back to front each character -
please help,
i have string 7865, how rotate string 5687.
whether using loop or call method lastindexof ?
thanks help.
use stringbuffer reverse string.
string string="5678"; string reverse = new stringbuffer(string). reverse().tostring(); system.out.println("\nstring before reverse: "+string); system.out.println("string after reverse: "+reverse);
Comments
Post a Comment