object Main extends App { override def main (args : Array[String]) { if (args isEmpty) args update(0, "default argument") println("args(0) = " + args(0)) }}
Standard input is empty
Standard output is empty
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at Main$.main(Main.scala:4) at Main.main(Main.scala)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!