Here you can find the source of nextHour(Date date)
public static Date nextHour(Date date)
//package com.java2s; /**//from w w w . j a v a 2 s. c om * Project: zonda.logger.server * * File Created at 12-2-3 * DateUtil: DateUtil.java 12-2-3 darwin $ * * Copyright 2008 Alibaba.com Croporation Limited. * All rights reserved. * * This software is the confidential and proprietary information of * Alibaba Company. ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Alibaba.com. */ import java.util.Calendar; import java.util.Date; public class Main { public static Date nextHour(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.HOUR_OF_DAY, 1); return cal.getTime(); } }