Pin It

How to get and print current Date and Time in a Java program ?

Program to demonstrate how to get current Date and Time in Java

package com.hubberspot.object.example;

import java.util.Date;

public class WelcomeDate {

  public static void main(String[] args) {

    System.out.println("Hello, so you are back !");
    System.out.println("Welcome to Hubberspot !");
    System.out.println("Today's date is : "+ new Date());
  }
} 

Output of the program : 



Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Related Posts Plugin for WordPress, Blogger...

Post your related queries below ...

comments powered by Disqus
Powered by Blogger.
 
© 2012 Learn Java by Examples Template by Hubber Spot