java 取系统时间并加1秒钟
1个回答
展开全部
package test;
import java.util.Calendar;
public class JButtonTest
{
public static void main ( String[] args )
{
Calendar calendar = Calendar.getInstance ();
System.out.println (calendar.getTime ());
calendar.add (Calendar.SECOND, 1);
System.out.println (calendar.getTime ());
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询