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