Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.GregorianCalendar;

import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;

public class Main {

    public static void main(final String[] args) throws Exception {

        GregorianCalendar gcal = (GregorianCalendar) GregorianCalendar.getInstance();
        XMLGregorianCalendar xgcal = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);
        System.out.println(xgcal);
    }

}