Online Java Compiler By
JavaTpoint.com
import java.util.Date; public class JavaDateGetDayExample1 { public static void main(String[] args) { Date d=new Date(); System.out.println("day of the week is : "+d.getDay()); } }
Output