java dos輸入輸出
public class DaoXu {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動生成方法存根
System.out.println("請輸入單個字元並回車: ");
Scanner c = new Scanner(System.in);
String[] ch = new String[5];
for(int i=0; i<5; i++){
ch[i] = c.next();
}
//Arrays.sort(ch);
System.out.print("倒序輸出: ");
for (int j = ch.length-1; j >= 0; j--) {
System.out.print(ch[j]+" ");
}
}
}