package Week2_Lab; public class q3 { public static void main(String[] args) { long totalMilliseconds = System.currentTimeMillis(); long totalSeconds = totalMilliseconds/1000; long currSecond = totalSeconds % 60; long totalMinutes = totalSeconds / 60; long currMinute = totalMinutes % 60; long totalHours = totalMinutes / 60; long currrHour = totalHours % 24; System.out.println("Current time is " + currrHour + ":" + currMinute + ":" + currSecond + " GMT"); } }