I want to add 5 seconds to current time
Date date = new Date(); date.setSeconds(date.getSeconds()+ 5); System.out.println(\"old Value is: \"+date);
showing deprecated warning that means there is some better way available in java to do so.