0

Can anyone correct my code .if input = Wow i got this output should be this got i Wow but with only 1 space in between

public class Program { public static void main(String[] args) { String a ="Wow i got this"; String [] arr = a.split(" "); String w =""; int x =arr.length; for(int i=x-1;i>=0;--i){ String z = arr[i]; } String e= z.trim(); System.out.print(e); } }

13th May 2020, 5:08 AM
Shivam Rawal
1 Antwort
0
Tysm
13th May 2020, 6:00 AM
Shivam Rawal