I am looking at the Date documentation and trying to figure out how I can express NOW + 5 seconds. Here\'s some pseudocode:
import java.util.Date public clas
Try This..
Date now = new Date(); System.out.println(now); Calendar c = Calendar.getInstance(); c.setTime(now); c.add(Calendar.SECOND, 5); now = c.getTime(); System.out.println(now); // Output Tue Jun 11 16:46:43 BDT 2019 Tue Jun 11 16:46:48 BDT 2019