public class ArrayPrint { public static void main(String[] args) { int[] array = {1, 2, 3}; if (array != null) { for (int index = array.length - 1; index >= 0; index--) { System.out.println(array[index]); } } } }
public class 逆序 { public static void main(String[] args) { String s="逆序输出"; StringBuffer sb=new StringBuffer(s); System.out.println(sb.reverse()); } }
//出输序逆
int i=8; while(i>1) { System.out.print(i); i--; }