Get current time on your computer in Java

Description

The following code shows how to get current time on your computer.

Example


/*from w w  w  .j av  a  2  s.c  o m*/
import java.util.Calendar;

public class Main{

  public static void main(String[] args){
     Calendar calendar = Calendar.getInstance ();
  }

}




















Home »
  Java Tutorial »
    Date »




Date Get
Date Set
Date Format
Date Compare
Date Convert
Date Calculation
Date Parse
Timezone