// In java
String str[]=givenString.split(" ");
for(int a=str.length-1;a>=0;a--)
System.out.print(str[a]+" ");
Sigiloso
7 de jan. de 2011
Use String Tokenizer to parse words from string and subsequently push each word onto a stack. When there are no more tokens, pop the stack and concatenate back into string.