String s[] = {1,2,3,4,5,6,7}; for (int i = 0; i < s.length; i ++){ System.out.print(s[s.length-1-i] +","); }