How are you

package com.kangjia;
  import java.util.Arrays;
   
  public class Ha {
   
  public String[] changeLocation(String[] data){
   
  String temp="";
  for(int i=0;i
  temp=data[i];
  data[i]=data[data.length-i-1];
  data[data.length-i-1]=temp;
  }
   
  return data;
  }
  public static void main(String[] args) {
   
  String[] data = new String[3];
  data[0]="how";
  data[1]="are";
  data[2]="you";
  System.out.println( Arrays.toString(new Ha().changeLocation(data)));
   
   
  }
  }

posted on 2015-04-25 22:42  啦啦啦嗨  阅读(176)  评论(0编辑  收藏  举报

导航