by adrianmsmith · 9y ago · 0 comments
If a function accepts a java.util.Date and you pass an id of some database object by mistake, you'll get a compile error. If the function accepts a long you won't.
If a function accepts a java.util.Date and the parameter is called "start" you know it accepts an instant in time, if it accepts a long you might think it could be something else.
Yes, the class is terribly named, but before there was Java 8 and Jodatime, it was better to use it than a long.
Don't do java.util.Date.