/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
LocalDateTime primeiraData = LocalDateTime.of(2017, Month.JANUARY, 10, 14, 00, 00);
LocalDateTime segundaDate = LocalDateTime.of(2017, Month.JANUARY, 10, 16, 30, 00);
Duration testeDuration = Duration.between(primeiraData, segundaDate);
long s = testeDuration.getSeconds();
System.
out.
println("Resultado: " + String.
format("%d:%02d", s
/ 3600,
(s
% 3600) / 60));
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnRpbWUuKjsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJIAogICAgTG9jYWxEYXRlVGltZSBwcmltZWlyYURhdGEgPSBMb2NhbERhdGVUaW1lLm9mKDIwMTcsIE1vbnRoLkpBTlVBUlksIDEwLCAxNCwgMDAsIDAwKTsKICAgIExvY2FsRGF0ZVRpbWUgc2VndW5kYURhdGUgPSBMb2NhbERhdGVUaW1lLm9mKDIwMTcsIE1vbnRoLkpBTlVBUlksIDEwLCAxNiwgMzAsIDAwKTsKCiAgICBEdXJhdGlvbiB0ZXN0ZUR1cmF0aW9uID0gRHVyYXRpb24uYmV0d2VlbihwcmltZWlyYURhdGEsIHNlZ3VuZGFEYXRlKTsKICAgIGxvbmcgcyA9IHRlc3RlRHVyYXRpb24uZ2V0U2Vjb25kcygpOwogICAgU3lzdGVtLm91dC5wcmludGxuKCJSZXN1bHRhZG86ICIgKyBTdHJpbmcuZm9ybWF0KCIlZDolMDJkIiwgcyAvIDM2MDAsIChzICUgMzYwMCkgLyA2MCkpOwoKCgl9Cn0=