fork download
  1. object Main extends App {
  2. class Person(firstLast: String) {
  3. val ss = firstLast.trim.split(" ")
  4.  
  5. println(ss.getClass.getName)
  6. println(ss.length)
  7. ss.zipWithIndex foreach println
  8. }
  9.  
  10. new Person("John Doe")
  11. }
Success #stdin #stdout 0.41s 383104KB
stdin
Standard input is empty
stdout
[Ljava.lang.String;
3
(John,0)
(,1)
(Doe,2)