I thought it was java.sql.Time but several methods within this class are deprecated. It has only one constructor that receives a long data type argument, just like this.
Time(long time)
I get from the user a string with the following format: hh:mm
Any advices on how I can achieve this?
Thanks.
Have a look at
java.time.LocalTime
added in Java8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With