軟體工程導論課後習題Github作業(把一個英文句子中的單詞次序逆序,單詞中字母正常排列)

遇見是種偶然發表於2015-04-24

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]+" ");

                                               }

                                     }

                            }

 

 

 

相關文章