fork download
  1. import java.util.*
  2.  
  3. fun main(args: Array<String>) {
  4. val numeros: IntArray = intArrayOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
  5. val numeros2 = Array(10, { i -> i })
  6. println(Arrays.toString(numeros))
  7. println(Arrays.toString(numeros2))
  8. }
  9.  
  10. //https://pt.stackoverflow.com/q/292702/101
Success #stdin #stdout 0.09s 23848KB
stdin
Standard input is empty
stdout
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]