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

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -