I want to get the current hour,minute, and second from the Date
object.
This is my code:
Date date = new Date();
int hour = date.getHours();
But I get a kind of error, the getHours()
part doesnt work. I get a "The method getHours() from the type Data is deprecated". What does that mean, and how do I get the hour,minutes, and seconds?