MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.text.ParseException;

public class MainClass {

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

        java.util.Date today = new java.util.Date();
        java.sql.Date date = new java.sql.Date(today.getTime());
        java.util.GregorianCalendar cal = new java.util.GregorianCalendar();
        cal.setTime(date);
        System.out.println(cal.get(java.util.Calendar.DAY_OF_WEEK));

    }
}