Arrays类操作
import java.util.Arrays;
public class HelloWorld {
public static void main(String[] args) {
String[] hobbies = { "sports", "game", "movie" };
System.out.print(Arrays.sort(hobbies));
}
}
我想试下是否可以定义数组后,在打印中直接输入排序,然后输出,可是无法运行,求大神告知一二???