>>Get current minute
>>Get current second
>>Get current computer time in java
**************************************************************
COMPLETE SOURCE CODE FOR : GetCurrentHour.java
**************************************************************
import java.util.Date;
public class GetCurrentHour
{
public static void main(String[]args)
{
Date myDate=new Date();
//Get current hour in soldier time format
int currentHour=myDate.getHours();
//Print current hour that we get
System.out.println("Current hour is : "+currentHour);
}
}
**************************************************************
JUST COMPILE AND EXECUTE IT
**************************************************************