0
How to do a Reverse Display
i want to learn to do a reverse display like i input"how are you"the it comes out"you are how"
1 Respuesta
+ 1
public class Program
{
public static void main(String[] args) {
String text="How are you";
String [] sText=text.split(" ");
for(int i=sText.length-1;i>=0;i--){
System.out.print(sText[i]+' ');
}
}
}