JAVA PROGRAM FOR DATE AND TIME DISPLAY

A Simple Java Program for displaying Date and Time:

// HelloDate.java. 
/** Here we have a class comment
 * We see (a) Use of import and Java standard library, (b)
 *  use of comment documentation using the openning /**
 */

import java.util.*;

/** java.util is a class in java containing several convinient methods.
  * It includes, but is not limited, to some array manipulations tools,
  * a collection framework and date and time tools.
  */
public class HelloDate {
    /** Sole entry point to application 
     */
    public static void main (String[] args) {
 System.out.println (“Hello, it’s: “);
 System.out.println(new Date());
    }
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s