Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Calendar;
import java.util.TimeZone;

public class Main {

    public static void main(String[] args) {
        Calendar calParis = Calendar.getInstance();

        calParis.setTimeZone(TimeZone.getTimeZone("Europe/Paris"));
        System.out.println(
                "Time in Paris: " + calParis.get(Calendar.HOUR_OF_DAY) + ":" + calParis.get(Calendar.MINUTE));

    }
}
//Time in Paris: 17:51