
{filelink=5559}
import java.util.Calendar;
public class SoustractionHeure
{
public static void main(String[] args)
{
Calendar maintenant = Calendar.getInstance();
System.out.println("Heure : " + maintenant.get(Calendar.HOUR_OF_DAY) + ":"
+ maintenant.get(Calendar.MINUTE) + ":" + maintenant.get(Calendar.SECOND));
maintenant.add(Calendar.HOUR, -5);
System.out.println("5 heures Avant: " + maintenant.get(Calendar.HOUR_OF_DAY) + ":"
+ maintenant.get(Calendar.MINUTE) + ":" + maintenant.get(Calendar.SECOND));
}
}