View more - A Simple String to Date parser
Posted by xphree on Mon Feb 22 14:41:12 UTC 2010. Language scala

class DateConverter(str:String) {
  import java.util.Date
  import java.text.SimpleDateFormat

  def toDate() : Date = {
    val sdf = new SimpleDateFormat("yyyyMMdd")
    sdf.parse(str)
  }
}

        

View more - A static main
Posted by xphree on Fri Feb 19 22:22:39 UTC 2010. Language java

class Main {
  static {
    System.out.println("Hello world");
  }
}