kotlin字符串数组
Given a string array, we have to read, traverse, reverse and sort its elements.
给定一个字符串数组,我们必须读取,遍历,反转和排序其元素。
Example:
例:
Input:
arr = ["abc", "pqr", "xyz"]
Output:
String arra is: ["abc", "pqr", "xyz"]
Reversed: ["xyz", "pqr", "abc"]
Sorted (Ascending Order): ["abc", "pqr", "xyz"]
Sorted (Descending Order): ["xyz", "pqr", "abc"]
程序在Kotlin中读取,遍历,反向和排序字符串数组 (Program to read, traverse, reverse and sort string array in Kotlin)
package com.includehelp.basic
import java.util.*
//Main Function entry Point of P