Driver Code
public static void main ( String [ ] args ) { String s = " getting ▁ good ▁ at ▁ coding ▁ " + " needs ▁ a ▁ lot ▁ of ▁ practice " ; String [ ] words = s . split ( " \\ s " ) ; words = RevString ( words , words . length ) ; s = String . join ( " ▁ " , words ) ; System . out . println ( s ) ; } }