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); } }
1 Antwort
0
Tysm