From 2e8cd258c4e8c91049dec9258c0bfb1558e958bc Mon Sep 17 00:00:00 2001 From: Ramsakal143 <115875739+Ramsakal143@users.noreply.github.com> Date: Mon, 31 Oct 2022 01:02:29 +0530 Subject: [PATCH] count the current time (1900 - today).java --- count the current time (1900 - today).java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 count the current time (1900 - today).java diff --git a/count the current time (1900 - today).java b/count the current time (1900 - today).java new file mode 100644 index 0000000..4bd2de0 --- /dev/null +++ b/count the current time (1900 - today).java @@ -0,0 +1,21 @@ +package com.company; + +import java.util.Date; + +public class cwh_97_Date { + public static void main(String[] args) { + Date d=new Date(); + System.out.println(d); + System.out.println("Return Time"); + System.out.println(d.getTime()); + System.out.println("Return Date"); + System.out.println(d.getDate()); + System.out.println("Return Seconds"); + System.out.println(d.getSeconds()); + //starting tieme 1900 year + System.out.println("Return year"); + System.out.println(d.getYear()); + System.out.println("Return Minutes"); + System.out.println(d.getMinutes()); + } +}