package com.java2;
import java.util.Arrays;
public class Deom {
public static void main(String[] args) {
String[] hobbies={"sport","game","movies"};
Arrays.sort(hobbies);
System.out.println("输出hobbies数组中的元素:"+Arrays.toString(hobbies));
}
}
运行结果:输出hobbies数组中的元素:[game, movies, sport]
难道运行结果不该是 :[game,sport,movies]这样吗?
qq_被朋友说的我要改网名_0
慕的地6079101
虛無縹緲丶
相关分类