软件工程导论课后习题Github作业(把一个英文句子中的单词次序逆序,单词中字母正常排列)

Java源代码 

 

package yly; 

         import java.util.Scanner;

         public class ruanjian {

                                    

                                     public static void main(String[] args) {

                                               // TODO Auto-generated method stub

                                               String q = "how are you";

 

                                               String[] aa=(String[]) q.split(" ");

                                               for(int i = aa.length ;i>0 ;i--){

                                                        System.out.print(aa[i-1]+" ");

                                               }

                                     }

                            }

 

 

 

posted @ 2015-04-24 21:25  遇见是种偶然  阅读(223)  评论(0编辑  收藏  举报