Homepage

Read Fullscreen

OO fail - isn’t that what param types are for?

Potential runtime error of exactly the type the compiler is supposed to catch. 

(I know *why* in Java it has to take a Date and can’t specify a Timestamp object, but that’s a language (and potentially library) design error. I wonder how/if I could solve this in Scala….)

from: http://download.oracle.com/javase/6/docs/api/java/sql/Timestamp.html

 intcompareTo(Date o) 
          Compares this Timestamp object to the given Date, which must be a Timestamp object.