I want to execute a task periodically if time is in between
9 AM to 9:11 AM
I was able to capture the current time, but could please tell me how can I compare that with the above condition ??
public class Test {
public static void main(String[] args) {
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
String systemTime = sdf.format(new Date()).toString();
System.out.println(systemTime);
}
}