I want to use the Time class in Java.
Therefore i included the line
import java.sql.Time;
in my code.
The proble is, that javac reports:
sieve.java:28: error:Cannot find method "java.sql.Time()"
I use
javac: Version 2.1B released 17. July 2002
I have also jre1.4.2 installed, but in
/usr/local/j2re1.4.2/bin
I cannot find the javac Compiler.
Whats the solution to my problem?
Thanks in advance,
Andreas
Roland - 20 Mar 2005 13:32 GMT
> I want to use the Time class in Java.
> Therefore i included the line
[quoted text clipped - 21 lines]
>
> Andreas
Class java.sql.Time does not have an argumentless constructor.
Instead, use the one that takes a long as argument:
new java.sql.Time(12345678L);
But... are you actually dealing with SQL TIME values? That's what
java.sql.Time is intended for. Otherwise it's better to use
java.util.Date, java.util.Calendar and its subclasses for general
date/time manipulation.

Signature
Regards,
Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \