Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arrays 在scala中按字母顺序对字符串数组排序_Arrays_String_Scala_Sorting - Fatal编程技术网

Arrays 在scala中按字母顺序对字符串数组排序

Arrays 在scala中按字母顺序对字符串数组排序,arrays,string,scala,sorting,Arrays,String,Scala,Sorting,我正在尝试使用scala按字母顺序对字符串数组进行排序。调用该方法时,字符串以数组形式传递。该方法还必须返回带有排序字符串的数组。我该怎么做 谢谢 Mike您只需调用array.sorted

我正在尝试使用scala按字母顺序对字符串数组进行排序。调用该方法时,字符串以数组形式传递。该方法还必须返回带有排序字符串的数组。我该怎么做

谢谢


Mike

您只需调用
array.sorted