Online Java Compiler By
JavaTpoint.com
import java.util.Date; public class JavaDateGetSecondsExample1 { public static void main(String[] args) { Date d=new Date(); System.out.println("Second of the minute is : "+d.getSeconds()); } }
Output