Driver code
public static void main ( String [ ] args ) { String str = " geeksforgeeks " ; int len = str . length ( ) ; int l = 5 , r = 7 ; System . out . println ( reverse ( str . toCharArray ( ) , len , l , r ) ) ; } }